Skip to content

Commit

Permalink
refactor: set map condition branch (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Jul 9, 2024
1 parent 79eab23 commit 4ecc343
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 4ecc343

Please sign in to comment.