From 577943ea719a3b4a0e14764d1fa81a2422c43abf Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 31 May 2021 10:41:20 +0530 Subject: [PATCH] check if hardhat is active before deactivating --- apps/remix-ide/src/app/files/remixd-handle.js | 2 +- apps/remix-ide/src/remixAppManager.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/files/remixd-handle.js b/apps/remix-ide/src/app/files/remixd-handle.js index 24b9d390ad..5708cd5d7b 100644 --- a/apps/remix-ide/src/app/files/remixd-handle.js +++ b/apps/remix-ide/src/app/files/remixd-handle.js @@ -40,7 +40,7 @@ export class RemixdHandle extends WebsocketPlugin { deactivate () { if (super.socket) super.deactivate() // this.appManager.deactivatePlugin('git') // plugin call doesn't work.. see issue https://github.com/ethereum/remix-plugin/issues/342 - this.appManager.deactivatePlugin('hardhat') + if (this.appManager.actives.includes('hardhat')) this.appManager.deactivatePlugin('hardhat') this.locahostProvider.close((error) => { if (error) console.log(error) }) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index e60457ad4f..a483143ba3 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -53,8 +53,6 @@ export class RemixAppManager extends PluginManager { } async deactivatePlugin (name) { - const isActive = await this.isActive(name) - if (!isActive) return const [to, from] = [ await this.getProfile(name), await this.getProfile(this.requestFrom)