Skip to main content

Bug Tracker

Side navigation

#6316 closed bug (invalid)

Opened March 19, 2010 06:36AM UTC

Closed October 25, 2010 09:34PM UTC

Some jQuery methods don't their check private variables.

Reported by: Larry Battle Owned by:
Priority: undecided Milestone: 1.4.3
Component: core Version: 1.4.2
Keywords: error Cc:
Blocked by: Blocking:
Description

When faced with no arguments, most methods error out with no problems or return a value. But...

Each of the following method calls, starting with css, will return an error and stop the rest of the script.

$(document.body).css().each().filter().map().ready();
$(document.body).text('Test Completed.');

Demo: http://jsbin.com/eriva/

Attachments (1)
Change History (4)

Changed March 21, 2010 12:03AM UTC by dmethvin comment:1

What is the suggested behavior for these cases?

Changed March 27, 2010 05:22PM UTC by Larry Battle comment:2

jQuery should just return the jquery object to fail safe.

if( !arguments.length ){ return this; }

Changed June 15, 2010 12:57AM UTC by dmethvin comment:3

component: unfiledcore

Changed October 25, 2010 09:34PM UTC by rwaldron comment:4

priority: → undecided
resolution: → invalid
status: newclosed

The cases are all incorrect uses of the methods per the documentation and api.