Skip to main content

Bug Tracker

Side navigation

#4578 closed bug (fixed)

Opened April 22, 2009 11:11PM UTC

Closed April 23, 2009 01:11AM UTC

$(undefined) should not return the document

Reported by: subtlegradient Owned by: john
Priority: major Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

$(document.getElementById('not-here')) -> document

$(null) -> document

$(undefined) -> document

$(false) -> document

$('') -> document

etc...

Should return an empty set or something to that effect.

This is a very difficult thing to debug.

Attachments (1)
  • verify_undefined_selector.diff (0.8 KB) - added by subtlegradient April 23, 2009 04:53AM UTC.

    unit test to verify fix and catch any future regressions

Change History (3)

Changed April 23, 2009 01:11AM UTC by john comment:1

description: \ $(document.getElementById('not-here')) -> document \ \ $(null) -> document \ \ $(undefined) -> document \ \ $(false) -> document \ \ $('') -> document \ \ etc... \ \ Should return an empty set or something to that effect. \ \ This is a very difficult thing to debug. \ $(document.getElementById('not-here')) -> document \ \ $(null) -> document \ \ $(undefined) -> document \ \ $(false) -> document \ \ $('') -> document \ \ etc... \ \ Should return an empty set or something to that effect. \ \ This is a very difficult thing to debug. \
resolution: → worksforme
status: newclosed

This has already been fixed in the nightlies.

Changed April 23, 2009 01:11AM UTC by john comment:2

resolution: worksforme
status: closedreopened

Changed April 23, 2009 01:11AM UTC by john comment:3

resolution: → fixed
status: reopenedclosed