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

contracts: fix bad prototype logic #2120

Closed

Conversation

ChALkeR
Copy link

@ChALkeR ChALkeR commented Sep 30, 2021

Otherwise, if event.name === "__proto__", this logic would hit a setter and wouldn't do what it's expected to do.

This fix should affect anything else as the unique**** objects are local, temporary and references to them are not exported outside of the function.

Some other packages have similar issues, but it's a bit harder to fix them there without bumping to modern es, I'll file separate PRs later.

@ricmoo
Copy link
Member

ricmoo commented Sep 30, 2021

This was brought up in #2091, but I don't think it poses any significant issues, does it? The notes on MDN regarding Object.create(null) sounds more like it could raise other issues, especially on more obscure environments, which I don't have access to test on.

It will be fixed in v6 though, which uses ES5 modules (targeted for ES2016), so Maps and such are available, as well as Proxy, which handles most of this.

@ChALkeR
Copy link
Author

ChALkeR commented Sep 30, 2021

Where can I see the v6 branch?

Alternatively, this could be fixed by using Set/Map, of course.

@ricmoo
Copy link
Member

ricmoo commented Sep 30, 2021

Set/Map are not available in the target environments for v5, unfortunately.

The v6 branch is still local on my machine and not available to the public. I’m frantically working my days away trying to get it ready for a public beta though. :)

Which is why I’m trying to punt more minor feature requests against v5, so that I have more time to work on it and many of those feature requests are moot in v6. :)

@ricmoo
Copy link
Member

ricmoo commented Oct 20, 2021

This should be fixed in 5.5.0. Please try it out and let me know.

Thanks!

2 similar comments
@ricmoo
Copy link
Member

ricmoo commented Oct 20, 2021

This should be fixed in 5.5.0. Please try it out and let me know.

Thanks!

@ricmoo
Copy link
Member

ricmoo commented Oct 20, 2021

This should be fixed in 5.5.0. Please try it out and let me know.

Thanks!

@ricmoo ricmoo added bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. labels Oct 20, 2021
@ricmoo
Copy link
Member

ricmoo commented Nov 19, 2021

@Tulle121 can you provide an example of what is not working along with any error?

@Tulle121
Copy link

resolved human error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants