Resolve safari not working due to missing chrome api (nativeMessaging) (#1585)

This commit is contained in:
Oscar Hinton 2021-01-29 23:31:36 +01:00 committed by GitHub
parent c7966773a9
commit 8e20e48373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -36,11 +36,13 @@ export class NativeMessagingBackground {
private messagingService: MessagingService, private appIdService: AppIdService) {
this.storageService.save(ConstantsService.biometricFingerprintValidated, false);
if (BrowserApi.isChromeApi) {
// Reload extension to activate nativeMessaging
chrome.permissions.onAdded.addListener((permissions) => {
BrowserApi.reloadExtension(null);
});
}
}
async connect() {
this.appId = await this.appIdService.getAppId();