From ff7e8a19accaf4f02a7cf9cc4697ff0f904c050c Mon Sep 17 00:00:00 2001 From: iCrawl Date: Fri, 24 Nov 2017 03:32:16 +0100 Subject: [PATCH] fix: make sure to not skip out on ENOENT --- src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 025c271..53bc639 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -82,7 +82,7 @@ function initRPC(clientID: string): void { // Log in to the RPC Client, and check whether or not it errors. rpc.login(clientID).catch(error => { - if (reconnect) return; + if (reconnect && !error.message.includes('ENOENT')) return; if (error.message.includes('ENOENT')) window.showErrorMessage('No Discord Client detected!'); else window.showErrorMessage(`Could not connect to discord via rpc: ${error.message}`); });