From 79725f659d5e9c449df0ff73f9363407a0a064bd Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 28 Aug 2019 20:55:23 +0200 Subject: [PATCH] Fix crashes from favico.js crashing the entire web app --- app/javascript/flavours/glitch/features/ui/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index be1a5343a2..dbfaf1220d 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -366,7 +366,11 @@ class UI extends React.Component { if (this.props.unreadNotifications != prevProps.unreadNotifications || this.props.showFaviconBadge != prevProps.showFaviconBadge) { if (this.favicon) { - this.favicon.badge(this.props.showFaviconBadge ? this.props.unreadNotifications : 0); + try { + this.favicon.badge(this.props.showFaviconBadge ? this.props.unreadNotifications : 0); + } catch (err) { + console.error(err); + } } } }