Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix(jqLite): ignore incompatible nodes on find() #4651

Closed
wants to merge 1 commit into from
Closed

fix(jqLite): ignore incompatible nodes on find() #4651

wants to merge 1 commit into from

Conversation

hsablonniere
Copy link
Contributor

When a jqLite collection contains text nodes, find() does not work :-(

This fix ignores all nodes than can't do getElementsByTagName()

It seems a little bit faster than testing nodeType : http://jsperf.com/nodetype-vs-duck-typing

Closes #4120

When a jqLite collection contains text nodes, find() does not work :-(

This fix ignores all nodes than can't do getElementsByTagName()

It seems a little bit faster than testing nodeType : http://jsperf.com/nodetype-vs-duck-typing

Closes #4120
@mary-poppins
Copy link

Thanks for the PR!

  • Contributor signed CLA now or in the past
    • If you just signed, leave a comment here with your real name
  • PR's commit messages follow the commit message format

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@hsablonniere
Copy link
Contributor Author

Is mary poppins supposed to check the boxes ? I signed the CLA for another commit and my commit message should follow the rules...

Let me know ;-)

@tbosch
Copy link
Contributor

tbosch commented Dec 3, 2013

Landed in master as 1169b54.
Thanks for this nice PR: Good commit description and with a good test.

@hsablonniere
Copy link
Contributor Author

Thanks Tobias ;-)

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

Successfully merging this pull request may close these issues.

JQLite.find() fails on when collection contains text nodes
3 participants