Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks if user is shadowing window #71

Open
ef4 opened this issue Jun 19, 2021 · 0 comments
Open

Breaks if user is shadowing window #71

ef4 opened this issue Jun 19, 2021 · 0 comments

Comments

@ef4
Copy link
Contributor

ef4 commented Jun 19, 2021

It's legal for the user to shadow window with a local variable:

let window = 'whatever';
class Foo {}

Which will result in:

let window = 'whatever';
class Foo {}
window.__CLASSIC_OWN_CLASSES__.set(Foo, true);

which throws an exception.

I think the output should change to:

__CLASSIC_OWN_CLASSES__.set(Foo, true);

so it's always accessing the global scope, regardless of what happens to window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant