File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -285,9 +285,10 @@ export default function makeServiceMutations() {
285
285
: Model && _get ( Model , `copiesById[${ id } ]` )
286
286
287
287
if ( copy ) {
288
- const original = copy [ state . idField ]
289
- ? state . keyedById [ id ]
290
- : state . tempsById [ id ]
288
+ const original =
289
+ copy [ state . idField ] != null
290
+ ? state . keyedById [ id ]
291
+ : state . tempsById [ id ]
291
292
mergeWithAccessors ( copy , original )
292
293
}
293
294
} ,
@@ -304,9 +305,10 @@ export default function makeServiceMutations() {
304
305
: Model && _get ( Model , `copiesById[${ id } ]` )
305
306
306
307
if ( copy ) {
307
- const original = copy . __isTemp
308
- ? state . tempsById [ id ]
309
- : state . keyedById [ id ]
308
+ const original =
309
+ copy [ state . idField ] != null
310
+ ? state . keyedById [ id ]
311
+ : state . tempsById [ id ]
310
312
mergeWithAccessors ( original , copy )
311
313
}
312
314
} ,
You can’t perform that action at this time.
0 commit comments