1
0
mirror of https://github.com/bitwarden/browser synced 2025-01-20 00:12:09 +01:00

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

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