From 251d0fdde3a362db0cd52a24e471e1c9f88c6d69 Mon Sep 17 00:00:00 2001 From: Hinton Date: Wed, 21 Oct 2020 17:50:27 +0200 Subject: [PATCH] Handle another error message --- src/background/nativeMessaging.background.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/background/nativeMessaging.background.ts b/src/background/nativeMessaging.background.ts index d15f3978c8..a03554da27 100644 --- a/src/background/nativeMessaging.background.ts +++ b/src/background/nativeMessaging.background.ts @@ -68,7 +68,8 @@ export class NativeMessagingBackground { }); this.port.onDisconnect.addListener(() => { - if (BrowserApi.runtimeLastError().message === 'Specified native messaging host not found.') { + const error = BrowserApi.runtimeLastError().message; + if (error === 'Specified native messaging host not found.' || error === 'Access to the specified native messaging host is forbidden.') { this.messagingService.send('showDialog', { text: this.i18nService.t('desktopIntegrationDisabledDesc'), title: this.i18nService.t('desktopIntegrationDisabledTitle'),