Skip to content

Commit 18a7cc1

Browse files
committed
fix: unwrap into new object
1 parent 3e48b45 commit 18a7cc1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/client-nuxt/src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,10 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
586586
return unwrapRefs(unref(value) as T);
587587
}
588588

589+
// unwrap into new object to avoid modifying the source
590+
const result: Record<string, unknown> = {};
589591
for (const key in value) {
590-
// @ts-expect-error
591-
value[key] = unwrapRefs(value[key] as T);
592+
result[key] = unwrapRefs(value[key] as T);
592593
}
593-
594-
return value as UnwrapRefs<T>;
594+
return result as UnwrapRefs<T>;
595595
};

0 commit comments

Comments
 (0)