Bug 1245377 - Avoid use of Object.values in SyncedTabs sidebar as it only exists on nightly: eslint fix followup. r=eslint-fix

This commit is contained in:
Sebastian Hengst 2016-02-06 00:00:50 +01:00
parent c03408de22
commit dbea41486e
2 changed files with 4 additions and 2 deletions

View File

@ -82,7 +82,8 @@ SyncedTabsDeckComponent.prototype = {
this._deckStore.on("change", state => this._deckView.render(state));
// Trigger the initial rendering of the deck view
this._deckStore.setPanels([for (kv of Iterator(this.PANELS)) kv[1]]); // Object.values only in nightly
// Object.values only in nightly
this._deckStore.setPanels(Object.keys(this.PANELS).map(k => this.PANELS[k]));
// Set the initial panel to display
this.updatePanel();
},

View File

@ -52,7 +52,8 @@ add_task(function* testInitUninit() {
Assert.ok(deckStore.on.calledOnce, "listener is added to store");
Assert.equal(deckStore.on.args[0][0], "change");
let values = [for (kv of Iterator(component.PANELS)) kv[1]]; // Object.values only in nightly
// Object.values only in nightly
let values = Object.keys(component.PANELS).map(k => component.PANELS[k]);
Assert.ok(deckStore.setPanels.calledWith(values),
"panels are set on deck store");