dont exist when bgMain is null

This commit is contained in:
Kyle Spearrin 2018-01-24 12:38:19 -05:00
parent 6a22410a60
commit 020520729c
1 changed files with 3 additions and 7 deletions

View File

@ -20,17 +20,13 @@ export default class Analytics {
}
const bgMain = bgPage.bitwardenMain;
if (!bgMain) {
return;
}
if (platformUtilsService == null) {
if (platformUtilsService == null && bgMain) {
this.platformUtilsService = bgMain.platformUtilsService as PlatformUtilsService;
}
if (storageService == null) {
if (storageService == null && bgMain) {
this.storageService = bgMain.storageService as StorageService;
}
if (appIdService == null) {
if (appIdService == null && bgMain) {
this.appIdService = bgMain.appIdService as AppIdService;
}