We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0343988 commit f266713Copy full SHA for f266713
src/store/modules/tagsView.js
@@ -39,7 +39,12 @@ const mutations = {
39
},
40
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
41
const index = state.cachedViews.indexOf(view.name)
42
- index > -1 && (state.cachedViews = state.cachedViews.slice(index, index + 1))
+ if (index > -1) {
43
+ state.cachedViews = state.cachedViews.slice(index, index + 1)
44
+ } else {
45
+ // if index = -1, there is no cached tags
46
+ state.cachedViews = []
47
+ }
48
49
50
DEL_ALL_VISITED_VIEWS: state => {
0 commit comments