Bug 1419407 - remove Immutable usage in prefs reducer; r=nchevobbe

MozReview-Commit-ID: ADyu8ULDDm6

--HG--
extra : rebase_source : 7d48ef734ffe594eeca1efde8623679cf44022f8
This commit is contained in:
Russell 2017-11-23 08:02:57 -08:00
parent 3b87e70f85
commit b0fcec315e
2 changed files with 4 additions and 5 deletions

View File

@ -5,13 +5,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Immutable = require("devtools/client/shared/vendor/immutable");
const PrefState = Immutable.Record({
const PrefState = (overrides) => Object.freeze(Object.assign({
logLimit: 1000,
sidebarToggle: false
});
}, overrides));
function prefs(state = new PrefState(), action) {
function prefs(state = PrefState(), action) {
return state;
}

View File

@ -45,7 +45,7 @@ function configureStore(hud, options = {}) {
const sidebarToggle = Services.prefs.getBoolPref(PREFS.UI.SIDEBAR_TOGGLE);
const initialState = {
prefs: new PrefState({ logLimit, sidebarToggle }),
prefs: PrefState({ logLimit, sidebarToggle }),
filters: new FilterState({
error: Services.prefs.getBoolPref(PREFS.FILTER.ERROR),
warn: Services.prefs.getBoolPref(PREFS.FILTER.WARN),