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

mount: fix broken .parents() #713

Merged
merged 2 commits into from
Dec 2, 2016
Merged

mount: fix broken .parents() #713

merged 2 commits into from
Dec 2, 2016

Conversation

just-boris
Copy link
Contributor

Actually, this is a bug report. Test should pass, but it doesn't.

When elements tree has more than one branch, .parents() method returns some nodes, which are not parent of the element.

@just-boris
Copy link
Contributor Author

Currently, I don't have time to look at this deeply.
If somebody will provide an idea how to fix this, I will update the PR.

@ljharb
Copy link
Member

ljharb commented Dec 2, 2016

Thanks! I added the same test case to shallow (which wasn't broken), and then adapted the ShallowTraversal solution to work for MountedTraversal.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

LGTM obv, but other collabs should stamp too

@ljharb ljharb changed the title Add test case for broken .parents() call mount: fix broken .parents() Dec 2, 2016
Copy link
Collaborator

@aweary aweary left a comment

Choose a reason for hiding this comment

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

LGTM except for the small nit. Not a blocker though.

}

// This function could be called with a number of different things technically, so we need to
// pass the *right* thing to our internal helper.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this comment feels too vague, what are things and what is the right thing?

Copy link
Member

Choose a reason for hiding this comment

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

This comment is already in master; I just moved the function higher up due to no-use-before-define

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.

3 participants