Catch uncaught (in promise)

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2019-10-06 21:00:10 +02:00 committed by Roeland Jago Douma
parent b076e3a17d
commit ce454e096b
No known key found for this signature in database
GPG key ID: F941078878347C0C
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