You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 30, 2023. It is now read-only.
Which version of PhantomJS are you using? Tip: run phantomjs --version.
2.1.1
What steps will reproduce the problem?
JSON.stringify(
[
{a: 1,b: 1},
{a: 2,b: 1},
{a: 3,b: 1}
].sort(
function (i,j) {
return i.b > j.b ? 1 : -1;
}
)
)
in PhantomJS 2.1.1
"[{"a":3,"b":1},{"a":2,"b":1},{"a":1,"b":1}]"
in Chrome
"[{"a":1,"b":1},{"a":2,"b":1},{"a":3,"b":1}]"
Which operating system are you using?
Mac OS X 10.10.5
Did you use binary PhantomJS or did you compile it from source?
binary
Please provide any additional information below.
if change the compare function to
if (i.b===j.b) return 0; return i.b > j.b ? 1 : -1
the result is the same.
so, maybe this is not a REAL problem?
The text was updated successfully, but these errors were encountered:
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!
Which version of PhantomJS are you using? Tip: run
phantomjs --version
.2.1.1
What steps will reproduce the problem?
JSON.stringify(
[
{a: 1,b: 1},
{a: 2,b: 1},
{a: 3,b: 1}
].sort(
function (i,j) {
return i.b > j.b ? 1 : -1;
}
)
)
in PhantomJS 2.1.1
"[{"a":3,"b":1},{"a":2,"b":1},{"a":1,"b":1}]"
in Chrome
"[{"a":1,"b":1},{"a":2,"b":1},{"a":3,"b":1}]"
Which operating system are you using?
Mac OS X 10.10.5
Did you use binary PhantomJS or did you compile it from source?
binary
Please provide any additional information below.
if change the compare function to
if (i.b===j.b) return 0; return i.b > j.b ? 1 : -1
the result is the same.
so, maybe this is not a REAL problem?
The text was updated successfully, but these errors were encountered: