Return empty array for undefined nextIndexes

pull/5370/head
ioedeveloper 2 years ago committed by Aniket
parent 7ecc211f0e
commit 126d471b5a
  1. 2
      libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts

@ -34,7 +34,7 @@ const reducedOpcode = (opCodes, payload) => {
const top = bottom + length
return {
index: opCodes.index - bottom,
nextIndexes: opCodes.nextIndexes.map(index => index - bottom),
nextIndexes: opCodes.nextIndexes ? opCodes.nextIndexes.map(index => index - bottom) : [],
currentLineIndexes: (opCodes.absoluteCurrentLineIndexes && opCodes.absoluteCurrentLineIndexes.map(index => index - bottom)) || [],
display: opCodes.code.slice(bottom, top),
returnInstructionIndexes: payload.returnInstructionIndexes.map((index) => index.instructionIndex - bottom),

Loading…
Cancel
Save