Skip to content

Commit

Permalink
fix: handle null in deepSync (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyoNkmr authored Sep 15, 2024
1 parent 43aa9dc commit 8c0efdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/devtools/client/components/StateEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function deepSync(from: any, to: any) {
for (const key in fromValue) {
if (Array.isArray(fromValue[key]))
to[key] = fromValue[key].slice()
else if (typeof fromValue[key] === 'object')
else if (typeof fromValue[key] === 'object' && fromValue[key] !== null)
deepSync(fromValue[key], to[key])
else
to[key] = fromValue[key]
Expand Down

0 comments on commit 8c0efdb

Please sign in to comment.