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

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

Comments

Projects
None yet
2 participants
@mlewand
Contributor

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.

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Jul 13, 2015

Member

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

Member

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 gibson042 added the Selector label Jul 13, 2015

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Jul 13, 2015

Member

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

Member

gibson042 commented Jul 13, 2015

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

@mlewand

This comment has been minimized.

Show comment
Hide comment
@mlewand

mlewand Jul 13, 2015

Contributor

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!

Contributor

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

@cssmagic cssmagic referenced this issue in cssmagic/ChangeLog May 18, 2016

Open

jQuery #5

@jquery jquery 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.