diff --git a/src/app/debugger/debuggerUI/ButtonNavigator.js b/src/app/debugger/debuggerUI/ButtonNavigator.js index d804e9336b..dd665b31a2 100644 --- a/src/app/debugger/debuggerUI/ButtonNavigator.js +++ b/src/app/debugger/debuggerUI/ButtonNavigator.js @@ -128,6 +128,7 @@ ButtonNavigator.prototype.updateDisabled = function (id, disabled) { } ButtonNavigator.prototype.resetWarning = function (revertedReason) { + if (!this.view) return this.view.querySelector('#reverted #outofgas').style.display = (revertedReason === 'outofgas') ? 'inline' : 'none' this.view.querySelector('#reverted #parenthasthrown').style.display = (revertedReason === 'parenthasthrown') ? 'inline' : 'none' this.view.querySelector('#reverted').style.display = (revertedReason === '') ? 'none' : 'block' diff --git a/src/app/debugger/debuggerUI/Slider.js b/src/app/debugger/debuggerUI/Slider.js index 56f632456a..ddf0dcfbb5 100644 --- a/src/app/debugger/debuggerUI/Slider.js +++ b/src/app/debugger/debuggerUI/Slider.js @@ -13,6 +13,7 @@ class Slider { } setSliderLength (length) { + if (!this.view) return this.view.querySelector('#slider').setAttribute('max', length - 1) this.max = length - 1 this.disabled = (length === 0) @@ -27,6 +28,7 @@ class Slider { } onChange (event) { + if (!this.view) return var value = parseInt(this.view.querySelector('#slider').value) if (value === this.previousValue) return @@ -35,6 +37,7 @@ class Slider { } setValue (value) { + if (!this.view) return this.view.querySelector('#slider').value = value } diff --git a/src/app/debugger/debuggerUI/StepManager.js b/src/app/debugger/debuggerUI/StepManager.js index e7adfac90d..6c7186871c 100644 --- a/src/app/debugger/debuggerUI/StepManager.js +++ b/src/app/debugger/debuggerUI/StepManager.js @@ -35,6 +35,7 @@ StepManager.prototype.startButtonNavigator = function () { } StepManager.prototype.updateStep = function (step, stepState, jumpOutDisabled) { + if (!this.slider) return this.slider.setValue(step) this.buttonNavigator.stepChanged(stepState, jumpOutDisabled) this.event.trigger('stepChanged', [step])