Skip to content

Commit 0298f6d

Browse files
committed
updateTemps: add else block to avoid redundant merge
1 parent 5bab702 commit 0298f6d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/service-module/service-module.mutations.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ export default function makeServiceMutations() {
9090
!(item instanceof Model)
9191
) {
9292
item = new Model(item)
93+
} else {
94+
const original = state.keyedById[id]
95+
updateOriginal(original, item)
9396
}
94-
const original = state.keyedById[id]
95-
updateOriginal(original, item)
9697
}
9798

9899
// if addOnUpsert then add the record into the state, else discard it.

0 commit comments

Comments
 (0)