Skip to content

Commit 7e5bd8f

Browse files
Fix obj path being mutated
1 parent ac2d069 commit 7e5bd8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/adapter/shared/serialize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export function maybeSetSignal(
211211
path: ObjPath,
212212
value: any,
213213
) {
214-
const last = path.pop();
214+
const last = path.slice().pop();
215215
const parent = path.reduce((acc, attr) => (acc ? acc[attr] : null), obj);
216216
if (parent && last) {
217217
if (isSignal(parent)) {

0 commit comments

Comments
 (0)