Skip to content

Commit

Permalink
Fix crashes from favico.js crashing the entire web app
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Aug 29, 2019
1 parent 956c1cf commit 79725f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/javascript/flavours/glitch/features/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 79725f6

Please sign in to comment.