Fix crashes from favico.js crashing the entire web app

lolsob-rspec
Thibaut Girka 2019-08-28 20:55:23 +02:00 committed by ThibG
parent ed4dbca6bc
commit ee6653adcf
1 changed files with 5 additions and 1 deletions

View File

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