Side navigation
#12718 closed bug (duplicate)
Opened October 12, 2012 08:16PM UTC
Closed October 13, 2012 01:53AM UTC
matcherFromTokens, error type cannot be called from undefined
| Reported by: | fred.stackoverflow@gmail.com | Owned by: | fred.stackoverflow@gmail.com |
|---|---|---|---|
| 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.
Attachments (0)
Change History (5)
Changed October 12, 2012 08:18PM UTC by comment:1
| owner: | → fred.stackoverflow@gmail.com |
|---|---|
| status: | new → pending |
Changed October 12, 2012 08:50PM UTC by comment:2
| status: | pending → new |
|---|
Hello,
Yes I digged into it further here is the test
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.
Changed October 12, 2012 08:54PM UTC by comment:3
| resolution: | → notabug |
|---|---|
| status: | new → closed |
Yep, the error message is accurate, sorry that older versions allowed incorrect syntax.
Changed October 13, 2012 01:53AM UTC by comment:4
| component: | unfiled → selector |
|---|---|
| resolution: | notabug |
| status: | closed → reopened |
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.