From 4d3ffad2571fb9dd2ce19dfa7b83f2a1eaf60484 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Fri, 28 Jun 2019 22:24:38 -0500 Subject: [PATCH] Update idle.background.ts (#961) Handle cases where `chrome.idle` doesn't exist and there is no `browser` object either. Fixes #960 --- src/background/idle.background.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/background/idle.background.ts b/src/background/idle.background.ts index 2c066c4aa7..1be8fca7f6 100644 --- a/src/background/idle.background.ts +++ b/src/background/idle.background.ts @@ -15,7 +15,7 @@ export default class IdleBackground { constructor(private lockService: LockService, private storageService: StorageService, private notificationsService: NotificationsService) { - this.idle = chrome.idle || browser.idle; + this.idle = chrome.idle || (browser && browser.idle); } async init() {