Commit a64e75b6 authored by ioedeveloper's avatar ioedeveloper

Fixed error thrown in console from document.getElementById

parent 4d5159fe
...@@ -71,7 +71,7 @@ class ContractDropdownUI { ...@@ -71,7 +71,7 @@ class ContractDropdownUI {
setCheckedState (value) { setCheckedState (value) {
value = value === 'true' ? true : value === 'false' ? false : value value = value === 'true' ? true : value === 'false' ? false : value
this.ipfsCheckedState = value this.ipfsCheckedState = value
document.getElementById('deployAndRunPublishToIPFS').checked = value if (this.ipfsCheckbox) this.ipfsCheckbox.checked = value
} }
toggleCheckedState () { toggleCheckedState () {
...@@ -92,13 +92,13 @@ class ContractDropdownUI { ...@@ -92,13 +92,13 @@ class ContractDropdownUI {
const savedConfig = window.localStorage.getItem(`ipfs/${this.exEnvironment}/${this.networkName}`) const savedConfig = window.localStorage.getItem(`ipfs/${this.exEnvironment}/${this.networkName}`)
this.ipfsCheckedState = savedConfig === 'true' ? true : false // eslint-disable-line this.ipfsCheckedState = savedConfig === 'true' ? true : false // eslint-disable-line
const ipfsCheckbox = this.ipfsCheckedState === true this.ipfsCheckbox = this.ipfsCheckedState === true
? yo`<input id="deployAndRunPublishToIPFS" class="mr-2" checked type="checkbox" onchange=${this.toggleCheckedState.bind(this)} >` ? yo`<input id="deployAndRunPublishToIPFS" class="mr-2" checked type="checkbox" onchange=${this.toggleCheckedState.bind(this)} >`
: yo`<input id="deployAndRunPublishToIPFS" class="mr-2" type="checkbox" onchange=${this.toggleCheckedState.bind(this)} >` : yo`<input id="deployAndRunPublishToIPFS" class="mr-2" type="checkbox" onchange=${this.toggleCheckedState.bind(this)} >`
this.deployCheckBox = yo` this.deployCheckBox = yo`
<div class="mt-2 d-flex align-items-start"> <div class="mt-2 d-flex align-items-start">
${ipfsCheckbox} ${this.ipfsCheckbox}
<label <label
for="deployAndRunPublishToIPFS" for="deployAndRunPublishToIPFS"
class="p-0 m-0" class="p-0 m-0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment