From fc808d271db78bd467c348e7fd155c7e1f7cdc37 Mon Sep 17 00:00:00 2001 From: Lars Ivar Igesund Date: Sat, 21 Dec 2019 23:45:42 +0100 Subject: [PATCH] Change variable isObject to entryIsObject to avoid name collision with the imported function isObject. --- src/buildVariables.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buildVariables.ts b/src/buildVariables.ts index 8906863..cf6ed78 100644 --- a/src/buildVariables.ts +++ b/src/buildVariables.ts @@ -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') {