Fix crashes from favico.js crashing the entire web app

main
Thibaut Girka 5 years ago committed by ThibG
parent 956c1cf82a
commit 79725f659d

@ -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);
}
}
}
}

Loading…
Cancel
Save