Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#6769 closed bug

in IE8, jQuery.inArray call fails with error "'indexOf' is null or not an object"

Reported by: riamu Owned by: riamu
Priority: low Milestone: 1.4.3
Component: core Version: 1.4.2
Keywords: IE explorer inArray indexOf Cc:
Blocked by: Blocking:

Description

The method currently tests for existence using basic syntax:

if ( array.indexOf ) {

return array.indexOf( elem );

}

Suggest changing it to:

if (typeof array.indexOf == 'function') {

return array.indexOf( elem );

}

Change History (3)

comment:1 Changed 12 years ago by addyosmani

need: ReviewTest Case
Owner: set to riamu
Priority: low
Status: newpending

Could you please supply a valid test case here for us to evaluate?

comment:2 Changed 12 years ago by trac-o-bot

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

comment:3 Changed 12 years ago by [email protected]

This matter is resolved with the above as this circumstance only occurs when the array is null.

Note: See TracTickets for help on using tickets.