We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59bd17a commit c0435f6Copy full SHA for c0435f6
src/service-module/service-module.mutations.ts
@@ -321,9 +321,17 @@ export default function makeServiceMutations() {
321
322
// Removes the copy from copiesById
323
clearCopy(state, id) {
324
- const newCopiesById = Object.assign({}, state.copiesById)
325
- delete newCopiesById[id]
326
- state.copiesById = newCopiesById
+ const { keepCopiesInStore } = state
+ if (keepCopiesInStore) {
+ Vue.delete(state.copiesById, id)
327
+ } else {
328
+ const { serverAlias, servicePath } = state
329
+ const Model = _get(
330
+ models,
331
+ `[${serverAlias}].byServicePath[${servicePath}]`
332
+ )
333
+ Vue.delete(Model.copiesById, id)
334
+ }
335
},
336
337
/**
0 commit comments