Skip to content

Commit

Permalink
Merge pull request Weakky#4 from larsivi/master
Browse files Browse the repository at this point in the history
Change variable isObject to entryIsObject to avoid name collision
  • Loading branch information
marcantoine authored Jan 11, 2020
2 parents 004e6cf + fc808d2 commit b99e8d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/buildVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ const buildCreateVariables = (introspectionResults: IntrospectionResult) => (
data = data.map((id: string) => ({ id }))
}

let isObject = data.some((entry: any) => isObject(entry) && !isDate(entry))
let entryIsObject = data.some((entry: any) => isObject(entry) && !isDate(entry))

if (isObject) {
if (entryIsObject) {
data = data.map((entry: any) => Object.keys(entry)
.reduce((obj: any, key: any) => {
if (key === 'id') {
Expand Down

0 comments on commit b99e8d7

Please sign in to comment.