diff --git a/src/store/index.js b/src/store/index.js index ef235f64..df24ccd0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -116,7 +116,7 @@ export const store = new Vuex.Store({ // Server updates don't return the right. Therefore the right is reset after updating the list which is // confusing because all the buttons will disappear in that case. To prevent this, we're keeping the right // when updating the list in global state. - if (typeof state.currentList.maxRight !== 'undefined') { + if (typeof state.currentList.maxRight !== 'undefined' && (typeof currentList.maxRight === 'undefined' || currentList.maxRight === null)) { currentList.maxRight = state.currentList.maxRight } state.currentList = currentList diff --git a/src/views/list/ShowList.vue b/src/views/list/ShowList.vue index 086e0bcd..a3b4ee61 100644 --- a/src/views/list/ShowList.vue +++ b/src/views/list/ShowList.vue @@ -89,7 +89,7 @@ export default { return }, loadList() { - if(this.$route.name.includes('.settings.')) { + if (this.$route.name.includes('.settings.')) { return } @@ -116,12 +116,16 @@ export default { return this.replaceListView() } - // Don't load the list if we either already loaded it or aren't dealing with a list at all currently + // Don't load the list if we either already loaded it or aren't dealing with a list at all currently and + // the currently loaded list has the right set. if ( - this.$route.params.listId === this.listLoaded || - typeof this.$route.params.listId === 'undefined' || - this.$route.params.listId === this.currentList.id || - parseInt(this.$route.params.listId) === this.currentList.id + ( + this.$route.params.listId === this.listLoaded || + typeof this.$route.params.listId === 'undefined' || + this.$route.params.listId === this.currentList.id || + parseInt(this.$route.params.listId) === this.currentList.id + ) + && typeof this.currentList !== 'undefined' && this.currentList.maxRight !== null ) { return }