From 8e20e483733d9be1ff50d495f88a29cdb6647ef7 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 29 Jan 2021 23:31:36 +0100 Subject: [PATCH] Resolve safari not working due to missing chrome api (nativeMessaging) (#1585) --- src/background/nativeMessaging.background.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/background/nativeMessaging.background.ts b/src/background/nativeMessaging.background.ts index 3ac41756e2..7c74c38db3 100644 --- a/src/background/nativeMessaging.background.ts +++ b/src/background/nativeMessaging.background.ts @@ -36,10 +36,12 @@ export class NativeMessagingBackground { private messagingService: MessagingService, private appIdService: AppIdService) { this.storageService.save(ConstantsService.biometricFingerprintValidated, false); - // Reload extension to activate nativeMessaging - chrome.permissions.onAdded.addListener((permissions) => { - BrowserApi.reloadExtension(null); - }); + if (BrowserApi.isChromeApi) { + // Reload extension to activate nativeMessaging + chrome.permissions.onAdded.addListener((permissions) => { + BrowserApi.reloadExtension(null); + }); + } } async connect() {