Skip to main content

Bug Tracker

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 dmethvin comment:1

owner: → fred.stackoverflow@gmail.com
status: newpending

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.

Changed October 12, 2012 08:50PM UTC by fred.stackoverflow@gmail.com comment:2

status: pendingnew

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.

Changed October 12, 2012 08:54PM UTC by dmethvin comment:3

resolution: → notabug
status: newclosed

Yep, the error message is accurate, sorry that older versions allowed incorrect syntax.

Changed October 13, 2012 01:53AM UTC by gibson042 comment:4

component: unfiledselector
resolution: notabug
status: closedreopened

Changed October 13, 2012 01:53AM UTC by gibson042 comment:5

resolution: → duplicate
status: reopenedclosed

Duplicate of #12643.