fix favicon logic (#175)
This commit is contained in:
		
							parent
							
								
									979b4afc89
								
							
						
					
					
						commit
						18c3064801
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -8,10 +8,10 @@ export function notificationObservers (store) {
 | 
			
		|||
    if (!process.browser) {
 | 
			
		||||
      return
 | 
			
		||||
    }
 | 
			
		||||
    if (currentFaviconHasNotifications === hasNotifications) {
 | 
			
		||||
      return
 | 
			
		||||
    }
 | 
			
		||||
    scheduleIdleTask(() => {
 | 
			
		||||
      if (currentFaviconHasNotifications === hasNotifications) {
 | 
			
		||||
        return
 | 
			
		||||
      }
 | 
			
		||||
      setFavicon(hasNotifications ? '/favicon-alert.png' : '/favicon.png')
 | 
			
		||||
      currentFaviconHasNotifications = !currentFaviconHasNotifications
 | 
			
		||||
    })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue