Skip to main content

Bug Tracker

Side navigation

#13372 closed bug (notabug)

Opened February 02, 2013 07:20AM UTC

Closed February 02, 2013 11:46AM UTC

eq(null) returns eq(0)

Reported by: jqcomptime Owned by:
Priority: undecided Milestone: None
Component: traversing Version: git
Keywords: Cc:
Blocked by: Blocking:
Description

.eq(null) returns the same as .eq(0)

but .eq(undefined) returns the empty set as does .eq() with no paramters

I would think .eq(null) and .eq(undefined) would return the same thing.

Or is this the expected behavior?

http://jsfiddle.net/RwzWW/

Attachments (0)
Change History (1)

Changed February 02, 2013 11:46AM UTC by gibson042 comment:1

component: unfiledtraversing
resolution: → notabug
status: newclosed

http://api.jquery.com/eq/

null is invalid input for .eq, and thus has undefined behavior.