|
|
@ -74,9 +74,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
...prevState, |
|
|
|
...prevState, |
|
|
|
hideWarnings: api.getConfiguration('hideWarnings') || false, |
|
|
|
hideWarnings: api.getConfiguration('hideWarnings') || false, |
|
|
|
autoCompile: (autoCompile !== null) && (autoCompile !== undefined) ? autoCompile : api.getConfiguration('autoCompile') || false, |
|
|
|
autoCompile: typeof autoCompile === 'boolean' ? autoCompile : api.getConfiguration('autoCompile') || false, |
|
|
|
includeNightlies: api.getConfiguration('includeNightlies') || false, |
|
|
|
includeNightlies: api.getConfiguration('includeNightlies') || false, |
|
|
|
optimise: (optimize !== null) && (optimize !== undefined) ? optimize : api.getConfiguration('optimise') || false, |
|
|
|
optimise: typeof optimize === 'boolean' ? optimize : api.getConfiguration('optimise') || false, |
|
|
|
runs: (runs !== null) && (runs !== 'null') && (runs !== undefined) && (runs !== 'undefined') ? runs : 200, |
|
|
|
runs: (runs !== null) && (runs !== 'null') && (runs !== undefined) && (runs !== 'undefined') ? runs : 200, |
|
|
|
evmVersion: (evmVersion !== null) && (evmVersion !== 'null') && (evmVersion !== undefined) && (evmVersion !== 'undefined') ? evmVersion : 'default' |
|
|
|
evmVersion: (evmVersion !== null) && (evmVersion !== 'null') && (evmVersion !== undefined) && (evmVersion !== 'undefined') ? evmVersion : 'default' |
|
|
|
} |
|
|
|
} |
|
|
@ -408,7 +408,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
const checked = e.target.checked |
|
|
|
const checked = e.target.checked |
|
|
|
|
|
|
|
|
|
|
|
api.setConfiguration('autoCompile', checked) |
|
|
|
api.setConfiguration('autoCompile', checked) |
|
|
|
state.autoCompile && compile() |
|
|
|
checked && compile() |
|
|
|
setState(prevState => { |
|
|
|
setState(prevState => { |
|
|
|
return { ...prevState, autoCompile: checked } |
|
|
|
return { ...prevState, autoCompile: checked } |
|
|
|
}) |
|
|
|
}) |
|
|
|