Skip to content

Commit 4fe510a

Browse files
committed
vuetify: fix the crud.js
1 parent e60bc6a commit 4fe510a

File tree

1 file changed

+4
-4
lines changed
  • templates/vue-common/store/modules

1 file changed

+4
-4
lines changed

templates/vue-common/store/modules/crud.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ import { getField, updateField } from 'vuex-map-fields';
33
import remove from 'lodash/remove';
44
import SubmissionError from '../../error/SubmissionError';
55

6-
const initialState = {
6+
const initialState = () => ({
77
allIds: [],
88
byId: {},
99
created: null,
1010
deleted: null,
11-
error: '',
11+
error: "",
1212
isLoading: false,
1313
resetList: false,
1414
selectItems: null,
1515
totalItems: 0,
1616
updated: null,
1717
view: null,
1818
violations: null
19-
};
19+
});
2020

2121
const handleError = (commit, e) => {
2222
commit(ACTIONS.TOGGLE_LOADING);
@@ -26,7 +26,7 @@ const handleError = (commit, e) => {
2626
// eslint-disable-next-line
2727
commit(ACTIONS.SET_ERROR, e.errors._error);
2828

29-
return;
29+
return Promise.reject(e);
3030
}
3131

3232
// eslint-disable-next-line

0 commit comments

Comments
 (0)