fix default layout collections retrieve

This commit is contained in:
lesion
2022-08-02 15:11:52 +02:00
parent 008aaed27e
commit 3e98f437b1

View File

@@ -41,7 +41,12 @@ export default {
return { collections: [], mdiChevronLeft } return { collections: [], mdiChevronLeft }
}, },
async fetch () { async fetch () {
this.collections = await this.$axios.$get('collections').catch(_e => []) if (this.$route.name && ['tag-tag', 'index', 'g-collection', 'p-place'].includes(this.$route.name)) {
this.collections = await this.$axios.$get('collections').catch(_e => [])
} else {
this.collections = []
}
}, },
name: 'Default', name: 'Default',
components: { Nav, Snackbar, Footer, Confirm }, components: { Nav, Snackbar, Footer, Confirm },