remove unneeded loop

pull/1344/head
yann300 4 years ago committed by joseph izang
parent a12b93bca1
commit 0a148e6ad9
  1. 10
      libs/remix-debug/src/code/codeManager.ts

@ -156,18 +156,20 @@ export class CodeManager {
next = codeMananger.getInstructionIndex(address, step + 1) next = codeMananger.getInstructionIndex(address, step + 1)
let values = this.traceManager.getAllStopIndexes() let values = this.traceManager.getAllStopIndexes()
values = values.filter((value) => value.address === address)
if (values) { if (values) {
for (const value of values) { for (const value of values) {
returnInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address }) if (value.address === address) {
returnInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address })
}
} }
} }
values = this.traceManager.getAllOutofGasIndexes() values = this.traceManager.getAllOutofGasIndexes()
values = values.filter((value) => value.address === address)
if (values) { if (values) {
for (const value of values) { for (const value of values) {
outOfGasInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address }) if (value.address === address) {
outOfGasInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address })
}
} }
} }
} catch (error) { } catch (error) {

Loading…
Cancel
Save