From 3a1eadca34816a6b2fea74f9a96e8258327d18d8 Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 2 Feb 2022 19:17:16 +0100 Subject: [PATCH] formatting --- packages/react-urql/src/hooks/state.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-urql/src/hooks/state.ts b/packages/react-urql/src/hooks/state.ts index 5b125fc10a..9ecb0bd924 100644 --- a/packages/react-urql/src/hooks/state.ts +++ b/packages/react-urql/src/hooks/state.ts @@ -4,11 +4,11 @@ export const initialState = { error: undefined, data: undefined, extensions: undefined, - operation: undefined + operation: undefined, }; const isShallowDifferent = (a: any, b: any) => { - if (typeof a != "object" || typeof b != "object") return a !== b; + if (typeof a != 'object' || typeof b != 'object') return a !== b; for (const x in a) if (!(x in b)) return true; for (const x in b) if (a[x] !== b[x]) return true; return false; @@ -31,7 +31,7 @@ export const computeNextState = ( data: result.data !== undefined || result.error ? result.data : prevState.data, fetching: !!result.fetching, - stale: !!result.stale + stale: !!result.stale, }; return isShallowDifferent(prevState, newState) ? newState : prevState;