Closed atifsyedali closed 3 years ago
The above tests pass if I change the following code for stepIdentifier
method:
while (!this.hasProperty(scope, node['name'])) {
scope = scope.parentScope;
}
to this
while (scope !== this.globalScope && !this.hasProperty(scope, node['name'])) {
scope = scope.parentScope;
}
Security-wise, I have no idea what implications that will have as I am very familiar with the codebase right now.
Can you provide definitions for describe
and it
, please? Or, better still, a smaller reproduction not using them at all? It's pretty much impossible to know what you might be expecting this code to do.
Smallest reproducible example...put the following code in the demo textbox on index.html and click Run, and notice console:
Object.defineProperty(window, "hello", {
get: function() { return "world"; }
});
alert(hello);
Thanks for the report. Fixed.
First, thank you for this awesome project.
I am trying to set a property with a getter on the global object so that I can lazily retrieve the values from the host. However, I keep hitting the following error regardless of how I try (also see tests below).
You can see the first and last test works, but is not really what I want, since I want to lazily fetch the values from the host using createAsyncFunction.