Skip to content

Commit

Permalink
refactor(pinia): condition branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Jul 9, 2024
1 parent 79eab23 commit 7282c94
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/pinia/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ function mergeReactiveObjects<
// Handle Map instances
if (target instanceof Map && patchToApply instanceof Map) {
patchToApply.forEach((value, key) => target.set(key, value))
}
// Handle Set instances
if (target instanceof Set && patchToApply instanceof Set) {
} else if (target instanceof Set && patchToApply instanceof Set) {
// Handle Set instances
patchToApply.forEach(target.add, target)
}

Expand Down

0 comments on commit 7282c94

Please sign in to comment.