pull/1174/head
yann300 4 years ago
parent 5292526633
commit 9411dec11c
  1. 8
      apps/remix-ide/src/app/tabs/runTab/settings.js

@ -66,12 +66,18 @@ class SettingsUI {
validateValue () {
const valueEl = this.el.querySelector('#value')
if (!valueEl.value) {
// assign 0 if given value is
// - empty
valueEl.value = 0
return
}
let v
try {
v = new BN(valueEl.value, 10)
} catch (e) {
// assign 0 if given value is
// - empty
// - not valid (for ex 4345-54)
// - contains only '0's (for ex 0000) copy past or edit
valueEl.value = 0

Loading…
Cancel
Save