From e922ff0bc291ff6fa493c9eb910545e2f41b2b14 Mon Sep 17 00:00:00 2001 From: Hinton Date: Mon, 4 Jan 2021 20:53:49 +0100 Subject: [PATCH] Make error handler more generic --- src/background/nativeMessaging.background.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/background/nativeMessaging.background.ts b/src/background/nativeMessaging.background.ts index a8db0cbf04..902ddee06a 100644 --- a/src/background/nativeMessaging.background.ts +++ b/src/background/nativeMessaging.background.ts @@ -115,9 +115,7 @@ export class NativeMessagingBackground { error = chrome.runtime.lastError.message; } - if (error === 'Specified native messaging host not found.' || - error === 'Access to the specified native messaging host is forbidden.' || - error === 'An unexpected error occurred') { + if (error != null) { this.messagingService.send('showDialog', { text: this.i18nService.t('desktopIntegrationDisabledDesc'), title: this.i18nService.t('desktopIntegrationDisabledTitle'),