When a function is executed via callFunc(name, ...args), we were accidentally losing the hostNode because we use interpreter.inSubEnv with the optional second parameter to pass in a custom environment. That environment is based on the prototype-like environment created for each component's definition, which can't include an accurate hostnode
based on runtime control flow. Manually set a hostNode when calling functions via callFunc.
When a function is executed via
callFunc(name, ...args)
, we were accidentally losing the hostNode because we use interpreter.inSubEnv with the optional second parameter to pass in a custom environment. That environment is based on the prototype-like environment created for each component's definition, which can't include an accurate hostnode based on runtime control flow. Manually set a hostNode when calling functions viacallFunc
.fixes #585