Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.

fix(core): Fix our array returns (#3696)

authored by Jovi De Croock and committed by GitHub e452d6f1 38290e71

Changed files
+8 -5
.changeset
packages
core
src
utils
+5
.changeset/thin-cougars-give.md
··· 1 + --- 2 + '@urql/core': patch 3 + --- 4 + 5 + Fix `deepMerge` regression on array values
+3 -5
packages/core/src/utils/result.ts
··· 57 57 target = [...target]; 58 58 for (let i = 0, l = source.length; i < l; i++) 59 59 target[i] = deepMerge(target[i], source[i]); 60 + 61 + return target; 60 62 } 61 - if ( 62 - !target.constructor || 63 - target.constructor === Object || 64 - Array.isArray(target) 65 - ) { 63 + if (!target.constructor || target.constructor === Object) { 66 64 target = { ...target }; 67 65 for (const key in source) 68 66 target[key] = deepMerge(target[key], source[key]);