Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#11277 closed bug (invalid)


Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


Calling .attr() with undefined throws an error on line 2474 Uncaught TypeError: Cannot call method 'toLowerCase' of undefined but should just return undefined.

Change History (2)

comment:1 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed

should just return undefined.

Says who? When called with one arg it should be the attribute name as a string, and undefined is not a string. We threw an error so you could find the bug! You're welcome.


comment:2 Changed 9 years ago by anonymous

I've got to say, this really isn't helpful. Couldn't jQuery do something like:

if (!arguments.length) {

throw new Error('attr requires at least one argument');


That would be MUCH more helpful than the current nebulous error.

Note: See TracTickets for help on using tickets.