-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
Fix potential inherited prototype chain issue #1091
Conversation
- https://eslint.org/docs/rules/guard-for-in#require-guarding-for-in-guard-for-in. - I was hit by this issue integrating preact with Material-UI. preact-compat: https://github.com/developit/preact-compat/blob/master/src/index.js#L46.
But why would a vnode get used as a plugin? 🤔 |
About the slow commit: I think we should run most checks in the CI and not allow merging without a passing build (though this is currently because external contributors build will always fail and browser stack often timeouts) |
@HenriBeck This is an excellent question. I haven't looked at why. I have assumed that the JSS should only take the plugin own properties and ignore the prototype chain. |
This is a result of importing (the reason is because preact-compat tries to install properties on the VNode class used by preact 8.x, and it does so by doing: |
I confirm that it works perfectly with preact/compat. I'm closing the pull request. It's too time-consuming to make it pass :). |
@developit Thank you! |
Thank you for bringing this back to our attention! We've just published an update to preact-compat that should make it warn when installing alongside Preact 10+. |
What would you like to add/fix?
name
equals$$typeof
in this fail.