From 9ca1b3bf26c8707a6d2c69daefeda4458e2bf53b Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 24 May 2020 07:40:49 -0400 Subject: [PATCH] fix issue where a undefined definition would be added to the callstack --- remix-debug/src/solidity-decoder/internalCallTree.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remix-debug/src/solidity-decoder/internalCallTree.js b/remix-debug/src/solidity-decoder/internalCallTree.js index 057552fbfb..0447e04e63 100644 --- a/remix-debug/src/solidity-decoder/internalCallTree.js +++ b/remix-debug/src/solidity-decoder/internalCallTree.js @@ -109,7 +109,10 @@ class InternalCallTree { let functions = [] if (!scopeId) return functions while (true) { - functions.push(this.functionDefinitionsByScope[scopeId]) + let functionDefinition = this.functionDefinitionsByScope[scopeId] + if (functionDefinition !== undefined) { + functions.push(functionDefinition) + } let parent = this.parentScope(scopeId) if (!parent) break else scopeId = parent