Opened 10 years ago
Closed 10 years ago
#12718 closed bug (duplicate)
matcherFromTokens, error type cannot be called from undefined
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | selector | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
at line 4914, the length can be 0
so the call
Expr.relative[ tokens[0].type ]
doesn't work.
I change it to
leadingRelative = len === 0 ? null : Expr.relative[ tokens[0].type ]
and it works for me.
I had this error when using jqueryui draggable.
Change History (5)
comment:1 Changed 10 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
Status: | pending → new |
---|
Hello,
Yes I digged into it further here is the test http://jsfiddle.net/msr9w/ open chrome console to see Uncaught TypeError: Cannot read property 'type' of undefined
the issue comes from a selector with a comma $("li,").
it was working in previews versions, but the syntax is incorrect.
comment:3 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Yep, the error message is accurate, sorry that older versions allowed incorrect syntax.
comment:4 Changed 10 years ago by
Component: | unfiled → selector |
---|---|
Resolution: | notabug |
Status: | closed → reopened |
comment:5 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Duplicate of #12643.
Note: See
TracTickets for help on using
tickets.
Hi Fred,
Can we have a test case? Otherwise we can't tell what the problem is or whether we have fixed it. Use jsfiddle.net or jsbin.com.