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)

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