Mormegil added a comment.

  Oh, great, that at least explains why I’m the first the report and fix this.
  
  Yeah, the implementation-defined 
<https://tc39.es/ecma262/multipage/indexed-collections.html#sec-sortindexedproperties>
 behavior of `array.sort` when given an inconsistent comparator (I mentioned it 
in the commit message) is obviously in play here: I’m using Firefox where the 
sort results are reversed, while in Chrome, Chromium-based browsers (I tested 
Edge), and in IE, the “always return +1” broken comparator results in the 
original sorting order (while “always return -1” results in the reversed order).
  
  You can try `[1,2,3,4].sort(function(){return 1})` in a browser console: 
Firefox gives `[4,3,2,1]`, Chromium and IE give `[1,2,3,4]`.

TASK DETAIL
  https://phabricator.wikimedia.org/T307601

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Mormegil
Cc: ovasileva, Jdlrobson, Aklapper, Mormegil, Fernandobacasegua34, 
Astuthiodit_1, Nishu02, 786, Suran38, Biggs657, karapayneWMDE, bwang, cjming, 
Invadibot, Lalamarie69, MPhamWMF, maantietaja, Juan90264, Alter-paule, 
Beast1978, CBogen, ItamarWMDE, Un1tY, Akuckartz, Hook696, Kent7301, 
joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, 
Af420, mojoaxel, Bsandipan, GoranSMilovanovic, QZanden, EBjune, LawExplorer, 
Winter, Lewizho99, Maathavan, _jensen, rosalieper, Neuronton, Scott_WUaS, 
Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to