1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.createReducer = void 0;
|
4 | const persist_1 = require("./persist");
|
5 | exports.createReducer = (handlers) => (state, action) => {
|
6 | if (action.type === persist_1.INITIALIZE_STATE_FROM_STORAGE) {
|
7 | return { ...state, ...action.payload };
|
8 | }
|
9 | if (!handlers.hasOwnProperty(action.type)) {
|
10 | return state;
|
11 | }
|
12 | return handlers[action.type](state, action);
|
13 | };
|
14 | //# sourceMappingURL=reducer.js.map |
\ | No newline at end of file |