Opened 11 years ago

Closed 9 years ago

#12121 closed defect (wontfix)

dojo.indexOf uses ==, should use ===

Reported by: JIm Fulton Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: Core Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


This results in::

dojo.indexOf([1], [1])

returning 0 rather than -1.

Change History (4)

comment:1 Changed 11 years ago by Chris Mitchell

Owner: anonymous deleted

comment:2 Changed 10 years ago by bill

Owner: set to Kris Zyp
Status: newassigned

comment:3 Changed 10 years ago by Kris Zyp

This isn't a backwards compatible change is it? Do you think we could make this change without causing users much trouble? Or should we wait for 2.0 to make this change?

comment:4 Changed 9 years ago by Kitson Kelly

Resolution: wontfix
Status: assignedclosed

The implementation of indexOf predates the ES5 standards. Moving to strict equals would break backwards compatibility and this function will not be part of 2.0.

Note: See TracTickets for help on using tickets.