Merge pull request #17433 from nextcloud/bugfix/uncaught-promise-navigationduplicated

NavigationDuplicated: catch uncaught (in promise)
This commit is contained in:
Roeland Jago Douma 2019-10-14 21:27:32 +02:00 committed by GitHub
commit d23e96b8da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View file

@ -148,14 +148,18 @@ export default {
},
methods: {
showAppDetails(event) {
async showAppDetails(event) {
if (event.currentTarget.tagName === 'INPUT' || event.currentTarget.tagName === 'A') {
return
}
this.$router.push({
name: 'apps-details',
params: { category: this.category, id: this.app.id }
})
try {
await this.$router.push({
name: 'apps-details',
params: { category: this.category, id: this.app.id }
})
} catch (e) {
// we already view this app
}
},
prefix(prefix, content) {
return prefix + '_' + content