Skip to content

Commit

Permalink
compilerContainer: don't use options[0] to current EVM target
Browse files Browse the repository at this point in the history
  • Loading branch information
scottt committed May 27, 2019
1 parent 462fb83 commit d8ff2dd
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/app/tabs/compileTab/compilerContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ class CompilerContainer {

this._view.evmVersionSelector = yo`
<select onchange="${this.onchangeEvmVersion.bind(this)}" class="custom-select" id="evmVersionSelector">
<option disabled selected>EVM Version: default</option>
<option value="default">compiler default</option>
<option>petersburg</option>
<option>constantinople</option>
Expand All @@ -154,7 +153,7 @@ class CompilerContainer {
}
}
if (i === s.options.length) { // invalid evmVersion from queryParams
s.selectedIndex = 1 // compiler default
s.selectedIndex = 0 // compiler default
this.onchangeEvmVersion()
} else {
s.selectedIndex = i
Expand Down Expand Up @@ -235,13 +234,7 @@ class CompilerContainer {
v = null
}
this.compileTabLogic.setEvmVersion(v)
if (!v) {
v = 'default'
}
const o = yo` <option disabled="disabled" selected="selected">EVM Version: ${v}</option>`
s.options[0] = o
s.selectedIndex = 0
// calling `runCompiler()` here would cause the UI to freeze with the selection drop down menu open
this.compile()
}

onchangeLoadVersion (event) {
Expand Down

0 comments on commit d8ff2dd

Please sign in to comment.