mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 1207491 - Part 2: Remove use of expression closure from browser/components/customizableui/PanelWideWidgetTracker.jsm. r=Gijs
--HG-- extra : commitid : Acf1RCE3KsA extra : rebase_source : d3b35457cf62c7eb09d7a469cc3a06abcaecf6ca
This commit is contained in:
parent
8cad6537b1
commit
ef4976c92f
@ -97,9 +97,9 @@ var PanelWideWidgetTracker = {
|
||||
// we want to start with the last widgets. Otherwise we move widgets over other wide
|
||||
// widgets, which might mess up their order. Likewise, if moving backwards we should start with
|
||||
// the first widget and work our way down/right from there.
|
||||
let compareFn = aMoveForwards ? (function(a, b) a < b) : (function(a, b) a > b)
|
||||
widgetsAffected.sort(function(a, b) compareFn(gPanelPlacements.indexOf(a),
|
||||
gPanelPlacements.indexOf(b)));
|
||||
let compareFn = aMoveForwards ? ((a, b) => a < b) : ((a, b) => a > b);
|
||||
widgetsAffected.sort((a, b) => compareFn(gPanelPlacements.indexOf(a),
|
||||
gPanelPlacements.indexOf(b)));
|
||||
for (let widget of widgetsAffected) {
|
||||
this.adjustPosition(widget, aMoveForwards);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user