Commit 3aab0b54 authored by Iuri Matias's avatar Iuri Matias

fix issue where a undefined definition would be added to the callstack

parent 34708aa6
...@@ -109,7 +109,10 @@ class InternalCallTree { ...@@ -109,7 +109,10 @@ class InternalCallTree {
let functions = [] let functions = []
if (!scopeId) return functions if (!scopeId) return functions
while (true) { while (true) {
functions.push(this.functionDefinitionsByScope[scopeId]) let functionDefinition = this.functionDefinitionsByScope[scopeId]
if (functionDefinition !== undefined) {
functions.push(functionDefinition)
}
let parent = this.parentScope(scopeId) let parent = this.parentScope(scopeId)
if (!parent) break if (!parent) break
else scopeId = parent else scopeId = parent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment