From 30efb685324becaa413679779e9cc3e07773adcf Mon Sep 17 00:00:00 2001 From: Crawl Date: Wed, 7 Nov 2018 04:02:31 +0100 Subject: [PATCH] fix: wrong scope for the reconnect button --- src/extension.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index a2f31a3..5b8016f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -52,12 +52,12 @@ export async function activate(context: ExtensionContext) { if (!config.get('silent')) { if (error.message.includes('ENOENT')) window.showErrorMessage('No Discord Client detected!'); else window.showErrorMessage(`Couldn't connect to Discord via RPC: ${error.toString()}`); - if (!statusBarIcon) { - statusBarIcon = window.createStatusBarItem(StatusBarAlignment.Left); - statusBarIcon.text = '$(plug) Reconnect to Discord'; - statusBarIcon.command = 'discord.reconnect'; - statusBarIcon.show(); - } + } + if (!statusBarIcon) { + statusBarIcon = window.createStatusBarItem(StatusBarAlignment.Left); + statusBarIcon.text = '$(plug) Reconnect to Discord'; + statusBarIcon.command = 'discord.reconnect'; + statusBarIcon.show(); } } } @@ -90,4 +90,4 @@ export async function deactivate() { await rpc.dispose(); } -process.on('unhandledRejection', console.error); +process.on('unhandledRejection', err => Logger.log(err));