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

Can't chain multiple find calls using Sizzle-less build #2466

Closed
mlewand opened this issue Jul 13, 2015 · 3 comments
Closed

Can't chain multiple find calls using Sizzle-less build #2466

mlewand opened this issue Jul 13, 2015 · 3 comments
Labels

Comments

@mlewand
Copy link
Contributor

@mlewand mlewand commented Jul 13, 2015

Looks like uniqueSort function is not resolved correctly when jQuery is builded without Sizzle dependency.

When I try to call chained find methods I'm getting following exception: Uncaught TypeError: n.uniqueSort is not a function

TC

  • Build jQuery with grunt custom:-sizzle

  • Try to chain multiple find calls, e.g.

    <!doctype html>
    <html lang="en">
        <head>
            <title>title</title>
        </head>
        <body>
        <div>
          foo
        </div>
            <div>
          <span>bar</span>
        </div>
    
        <script src="dist/jquery.min.js"></script>
        <script>
          console.log( $('div').find('span').length );
        </script>
        </body>
    </html>
  • An exception is thrown: Uncaught TypeError: n.uniqueSort is not a function.

It happens also with other calls, e.g. $( 'div' ).has( 'span' ).

Experienced with 84ccf26 and a2ae215.

mlewand added a commit to mlewand/jquery that referenced this issue Jul 13, 2015
mlewand added a commit to mlewand/jquery that referenced this issue Jul 13, 2015
mlewand added a commit to mlewand/jquery that referenced this issue Jul 13, 2015
@gibson042
Copy link
Member

@gibson042 gibson042 commented Jul 13, 2015

Confirmed; caused by e1090c3. We need selector-sizzle to define both uniqueSort and unique. @mlewand, would you like to open a pull request?

@gibson042
Copy link
Member

@gibson042 gibson042 commented Jul 13, 2015

Whoops, I see that you have without referencing this issue. I'll move discussion to gh-2467.

@mlewand
Copy link
Contributor Author

@mlewand mlewand commented Jul 13, 2015

Yes, you're right I've already made a PR for that. I believe it was already referenced as I've referenced this issue in PR description.

mlewand referenced this issue an hour ago

Anyway, I'll be happy to read your feedback in gh-2467!

@gibson042 gibson042 closed this in bf591fb Jul 14, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants