Skip to content

Commit

Permalink
fix(toRefs): fix stack overflow caused by recursive setPrototypeOf (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred-Skyblue committed Jun 21, 2023
1 parent 735b0f4 commit 9f998a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/toRefs/index.ts
Expand Up @@ -32,7 +32,7 @@ export function toRefs<T extends object>(
else {
const newObject = { ...objectRef.value, [key]: v }

Object.setPrototypeOf(newObject, objectRef.value)
Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value))

objectRef.value = newObject
}
Expand Down

0 comments on commit 9f998a4

Please sign in to comment.