fix isActive

pull/5370/head
yann300 5 years ago committed by LianaHus
parent c2b97eb00d
commit 0222afcd25
  1. 4
      src/app/panels/terminal.js
  2. 4
      src/app/tabs/test-tab.js

@ -434,9 +434,9 @@ class Terminal extends Plugin {
self.commands.html(intro)
self._components.txLogger = new TxLogger(this, self.blockchain)
self._components.txLogger.event.register('debuggingRequested', (hash) => {
self._components.txLogger.event.register('debuggingRequested', async (hash) => {
// TODO should probably be in the run module
if (!self._opts.appManager.isActive('debugger')) self._opts.appManager.activatePlugin('debugger')
if (!await self._opts.appManager.isActive('debugger')) await self._opts.appManager.activatePlugin('debugger')
this.call('debugger', 'debug', hash)
this.call('menuicons', 'select', 'debugger')
})

@ -225,9 +225,9 @@ module.exports = class TestTab extends ViewPlugin {
return this.generateFileActionElement
}
updateRunAction (currentFile) {
async updateRunAction (currentFile) {
let el = yo`<button id="runTestsTabRunAction" class="${css.runButton} btn btn-primary" onclick="${this.runTests.bind(this)}">Run Tests</button>`
const isSolidityActive = this.appManager.isActive('solidity')
const isSolidityActive = await this.appManager.isActive('solidity')
if (!currentFile || !isSolidityActive) {
el.setAttribute('disabled', 'disabled')
if (!currentFile) el.setAttribute('title', 'No file selected')

Loading…
Cancel
Save