diff --git a/app/resources/js/app.js b/app/resources/js/app.js index 8fc6d52..1b81427 100755 --- a/app/resources/js/app.js +++ b/app/resources/js/app.js @@ -245,9 +245,14 @@ const app = new Vue({ if (messageObject.author.username !== this.loggedInUser.username) { if (Notification.permission === 'granted') { - new Notification(`${messageObject.category.title}/${messageObject.author.username}`, { - body: messageObject.content - }); + try { + new Notification(`${messageObject.category.title}/${messageObject.author.username}`, { + body: messageObject.content + }); + } catch(e) { + console.log('[E] [chat] Failed to show notification'); + } + } } },