fix favicon logic (#175)

This commit is contained in:
Nolan Lawson 2018-04-19 09:34:56 -07:00 committed by GitHub
parent 979b4afc89
commit 18c3064801
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -8,10 +8,10 @@ export function notificationObservers (store) {
if (!process.browser) { if (!process.browser) {
return return
} }
if (currentFaviconHasNotifications === hasNotifications) {
return
}
scheduleIdleTask(() => { scheduleIdleTask(() => {
if (currentFaviconHasNotifications === hasNotifications) {
return
}
setFavicon(hasNotifications ? '/favicon-alert.png' : '/favicon.png') setFavicon(hasNotifications ? '/favicon-alert.png' : '/favicon.png')
currentFaviconHasNotifications = !currentFaviconHasNotifications currentFaviconHasNotifications = !currentFaviconHasNotifications
}) })