Skip to content

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

@mlewand

Description

@mlewand

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions