check if hardhat is active before deactivating

pull/1232/head
aniket-engg 4 years ago
parent 4532a3b8bd
commit 577943ea71
  1. 2
      apps/remix-ide/src/app/files/remixd-handle.js
  2. 2
      apps/remix-ide/src/remixAppManager.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)
})

@ -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)

Loading…
Cancel
Save