mirror of https://github.com/nextcloud/bookmarks
UI: Feature detect old search
This commit is contained in:
parent
4212be5daf
commit
a8220a45fa
|
@ -60,7 +60,10 @@ export default {
|
|||
},
|
||||
|
||||
async created() {
|
||||
this.search = new OCA.Search(this.onSearch, this.onResetSearch)
|
||||
if (OCA.Search) {
|
||||
// legacy search pre nc v20
|
||||
this.search = new window.OCA.Search(this.onSearch, this.onResetSearch)
|
||||
}
|
||||
// set loading indicator
|
||||
this.$store.commit(mutations.FETCH_START, { type: 'bookmarks' })
|
||||
await Promise.all([
|
||||
|
|
|
@ -47,6 +47,11 @@ export default {
|
|||
},
|
||||
|
||||
async created() {
|
||||
if (OCA.Search) {
|
||||
// legacy search pre nc v20
|
||||
this.search = new window.OCA.Search(this.onSearch, this.onResetSearch)
|
||||
}
|
||||
|
||||
// this.search = new OCA.Search(this.onSearch, this.onResetSearch)
|
||||
this.$store.commit(mutations.SET_AUTH_TOKEN, this.$route.params.token)
|
||||
// set loading indicator
|
||||
|
|
Loading…
Reference in New Issue