Update idle.background.ts (#961)

Handle cases where `chrome.idle` doesn't exist and there is no `browser` object either. Fixes #960
This commit is contained in:
Dustin Falgout 2019-06-28 22:24:38 -05:00 committed by Kyle Spearrin
parent f35bc516c0
commit 4d3ffad257
1 changed files with 1 additions and 1 deletions

View File

@ -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() {