refactor; remove unneded else

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent cd6061a4c7
commit 007b4ce5fb
  1. 27
      src/app/debugger/debuggerUI/VmDebugger.js

@ -186,20 +186,19 @@ class VmDebuggerLogic {
if (self._parent.currentStepIndex !== index) return if (self._parent.currentStepIndex !== index) return
if (!self.storageResolver) return if (!self.storageResolver) return
if (index === self.traceLength - 1) { if (index !== self.traceLength - 1) {
var storageJSON = {} return self.event.trigger('traceLengthUpdate', [{}])
for (var k in self.addresses) { }
var address = self.addresses[k] var storageJSON = {}
var storageViewer = new StorageViewer({ stepIndex: self._parent.currentStepIndex, tx: self._parent.tx, address: address }, self.storageResolver, self._traceManager) for (var k in self.addresses) {
storageViewer.storageRange(function (error, result) { var address = self.addresses[k]
if (!error) { var storageViewer = new StorageViewer({ stepIndex: self._parent.currentStepIndex, tx: self._parent.tx, address: address }, self.storageResolver, self._traceManager)
storageJSON[address] = result storageViewer.storageRange(function (error, result) {
self.event.trigger('traceLengthUpdate', [storageJSON]) if (!error) {
} storageJSON[address] = result
}) self.event.trigger('traceLengthUpdate', [storageJSON])
} }
} else { })
self.event.trigger('traceLengthUpdate', [{}])
} }
}) })
} }

Loading…
Cancel
Save