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:
parent
f35bc516c0
commit
4d3ffad257
|
@ -15,7 +15,7 @@ export default class IdleBackground {
|
||||||
|
|
||||||
constructor(private lockService: LockService, private storageService: StorageService,
|
constructor(private lockService: LockService, private storageService: StorageService,
|
||||||
private notificationsService: NotificationsService) {
|
private notificationsService: NotificationsService) {
|
||||||
this.idle = chrome.idle || browser.idle;
|
this.idle = chrome.idle || (browser && browser.idle);
|
||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
|
|
Loading…
Reference in New Issue