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

Is node shadow root check improved #5828

Merged
merged 1 commit into from Nov 18, 2018
Merged

Conversation

karaxuna
Copy link
Contributor

@karaxuna karaxuna commented Nov 12, 2018

Fixes #5826

@@ -486,7 +486,7 @@ module.exports = function() {
*/
helpers._getParentNode = function(domNode) {
var parent = domNode.parentNode;
if (parent && parent.host) {
if (parent && Object.prototype.toString.call(parent) === '[object ShadowRoot]') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I prefer if (parent && parent.toString() === '[object ShadowRoot]') { because it's better minified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonbrunel simonbrunel added this to the Version 2.8 milestone Nov 12, 2018
Copy link
Member

@simonbrunel simonbrunel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @karaxuna

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

Successfully merging this pull request may close these issues.

None yet

3 participants