File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ export default function makeServiceMutations() {
23
23
const Model = _get ( models , `[${ serverAlias } ][${ modelName } ]` )
24
24
const BaseModel = _get ( models , `[${ state . serverAlias } ].BaseModel` )
25
25
26
- const newKeyedById = { ...state . keyedById }
27
- const newTempsById = { ...state . tempsById }
28
-
29
26
for ( let item of items ) {
30
27
const id = getId ( item , idField )
31
28
const isTemp = id === null || id === undefined
@@ -45,16 +42,14 @@ export default function makeServiceMutations() {
45
42
tempId = assignTempId ( state , item )
46
43
}
47
44
item . __isTemp = true
48
- newTempsById [ tempId ] = item
45
+ Vue . set ( state . tempsById , tempId , item )
49
46
} else {
50
47
// Only add the id if it's not already in the `ids` list.
51
48
if ( ! state . ids . includes ( id ) ) {
52
49
state . ids . push ( id )
53
50
}
54
- newKeyedById [ id ] = item
51
+ Vue . set ( state . keyedById , id , item )
55
52
}
56
- state . keyedById = newKeyedById
57
- state . tempsById = newTempsById
58
53
}
59
54
}
60
55
You can’t perform that action at this time.
0 commit comments