@alexandregme/zljs 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -269,6 +269,7 @@ import {
|
|
|
269
269
|
combineReducers,
|
|
270
270
|
configureStore
|
|
271
271
|
} from "@reduxjs/toolkit";
|
|
272
|
+
var emptyReducer = (state = {}) => state;
|
|
272
273
|
var createReduxStore = ({
|
|
273
274
|
reducers,
|
|
274
275
|
middlewares,
|
|
@@ -276,11 +277,10 @@ var createReduxStore = ({
|
|
|
276
277
|
coreReducers
|
|
277
278
|
}) => {
|
|
278
279
|
let dynamicReducers = {};
|
|
279
|
-
const createReducer = () =>
|
|
280
|
-
...dynamicReducers,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
});
|
|
280
|
+
const createReducer = () => {
|
|
281
|
+
const all = { ...dynamicReducers, ...reducers, ...coreReducers };
|
|
282
|
+
return Object.keys(all).length ? combineReducers(all) : emptyReducer;
|
|
283
|
+
};
|
|
284
284
|
const store = configureStore({
|
|
285
285
|
reducer: createReducer(),
|
|
286
286
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(middlewares),
|
package/dist/index.js
CHANGED
package/dist/next/index.js
CHANGED