Merge branch 'release/0.17.3' of https://github.com/tainacan/tainacan into release/0.17.3

This commit is contained in:
vnmedeiros 2021-01-22 09:46:40 -03:00
commit e4eb7f1f56
3 changed files with 3 additions and 3 deletions

View File

@ -276,7 +276,7 @@ export default {
return this.selectedItems && this.selectedItems.length ? 1 : Math.ceil(Number(this.totalItems)/Number(this.maxItemsPerPage));
},
exposerBaseURL() {
let baseURL = this.collectionId != undefined ? '/collection/' + this.collectionId + '/items/' : '/items/';
let baseURL = this.collectionId ? '/collection/' + this.collectionId + '/items/' : '/items/';
let currentParams = JSON.parse(JSON.stringify(this.$route.query));
// Removes Fetch Only

View File

@ -32,7 +32,7 @@ export const viewModesMixin = {
}
},
mounted() {
this.isSlideshowViewModeEnabled = this.enabledViewModes.findIndex((viewMode) => viewMode == 'slideshow') >= 0;
this.isSlideshowViewModeEnabled = (this.enabledViewModes && Array.isArray(this.enabledViewModes)) ? (this.enabledViewModes.findIndex((viewMode) => viewMode == 'slideshow') >= 0) : false;
},
methods: {
getItemLink(itemUrl, index) {

View File

@ -775,7 +775,7 @@
const userPrefViewMode = this.$userPrefs.get(prefsViewMode);
let existingViewModeIndex = Object.keys(this.registeredViewModes).findIndex(viewMode => viewMode == userPrefViewMode);
let enabledViewModeIndex = this.enabledViewModes.findIndex((viewMode) => viewMode == userPrefViewMode);
let enabledViewModeIndex = (this.enabledViewModes && Array.isArray(this.enabledViewModes)) ? this.enabledViewModes.findIndex((viewMode) => viewMode == userPrefViewMode) : -1;
if (existingViewModeIndex >= 0 && enabledViewModeIndex >= 0)
this.$eventBusSearch.setInitialViewMode(userPrefViewMode);
else