Closed
Bug 619766
Opened 15 years ago
Closed 15 years ago
[undefined].sort() does not return valid array object
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 614915
People
(Reporter: mankyd, Unassigned)
Details
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b7) Gecko/20100101 Firefox/4.0b7
Build Identifier: Mozilla Firefox 4.0b7
Title really says it all: If you create an array containing a singled, undefined value, and call sort() on it, you don't get back an array. Instead, it seems to return a callable function of some sort
Expected:
[undefined].sort(); // == [undefined]
Actual:
[undefined].sort(); // == sort()
[undefined].sort()(); // == window
Reproducible: Always
Steps to Reproduce:
1. [undefined].sort().join('')
2. //raises exception
Actual Results:
[undefined].sort(); // == sort()
[undefined].sort()(); // == window
Expected Results:
[undefined]
This causes javascript errors in unexpected places that weren't crashing before. This is a fairly serious issue.
Comment 1•15 years ago
|
||
This has been fixed in Bug 614915.
Comment 2•15 years ago
|
||
Indeed. Dave, thank you for the bug report. Please verify that this is fixed once we ship beta 8?
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Comment 3•15 years ago
|
||
Yes, will do. Thanks!
| Reporter | ||
Comment 4•15 years ago
|
||
Just got the update. Looks happy. Thanks again.
You need to log in
before you can comment on or make changes to this bug.
Description
•