diff --git a/remix-debug/src/solidity-decoder/localDecoder.js b/remix-debug/src/solidity-decoder/localDecoder.js index b4dab50cec..5cc2c35c6f 100644 --- a/remix-debug/src/solidity-decoder/localDecoder.js +++ b/remix-debug/src/solidity-decoder/localDecoder.js @@ -9,7 +9,7 @@ async function solidityLocals (vmtraceIndex, internalTreeCall, stack, memory, st const locals = {} memory = formatMemory(memory) let anonymousIncr = 1 - for (var local in scope.locals) { + for (let local in scope.locals) { var variable = scope.locals[local] if (variable.stackDepth < stack.length && variable.sourceLocation.start <= currentSourceLocation.start) { let name = variable.name diff --git a/remix-debug/src/solidity-decoder/types/Struct.js b/remix-debug/src/solidity-decoder/types/Struct.js index 57e9d01789..7d3c8fa967 100644 --- a/remix-debug/src/solidity-decoder/types/Struct.js +++ b/remix-debug/src/solidity-decoder/types/Struct.js @@ -10,8 +10,7 @@ class Struct extends RefType { async decodeFromStorage (location, storageResolver) { const ret = {} - for (var k in this.members) { - const item = this.members[k] + for (var item of this.members) { const globalLocation = { offset: location.offset + item.storagelocation.offset, slot: util.add(location.slot, item.storagelocation.slot) diff --git a/remix-debug/src/storage/mappingPreimages.js b/remix-debug/src/storage/mappingPreimages.js index 9280e1fd62..e839ee981b 100644 --- a/remix-debug/src/storage/mappingPreimages.js +++ b/remix-debug/src/storage/mappingPreimages.js @@ -17,7 +17,7 @@ async function decodeMappingsKeys (web3, storage, corrections, callback) { const ret = {} if (!corrections.length) corrections.push({offset: 0, slot: 0}) for (let hashedLoc in storage) { - let preimage + var preimage try { const key = storage[hashedLoc].key for (let k in corrections) {