mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1419407 - remove Immutable usage in prefs reducer; r=nchevobbe
MozReview-Commit-ID: ADyu8ULDDm6 --HG-- extra : rebase_source : 7d48ef734ffe594eeca1efde8623679cf44022f8
This commit is contained in:
parent
3b87e70f85
commit
b0fcec315e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user