Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit fb7dad8

Browse files
authored
fix: update redux middleware in skeleton (#216)
1 parent fbc20eb commit fb7dad8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Not released
44
- Add improved htmlForFeature in skeleton [#215](https://github.com/CartoDB/carto-react-template/pull/215)
5+
- Fix immutable/serializable checks for redux middleware in skeleton [#216](https://github.com/CartoDB/carto-react-template/pull/216)
56

67
## 1.0.0-rc.1 (2021-03-11)
78
- Add cypress e2e tests in CI [#194](https://github.com/CartoDB/carto-react-template/pull/194)

template-skeleton/template/src/store/store.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ const staticReducers = {
7272
};
7373

7474
function getCustomMiddleware() {
75+
const devConfig = {
76+
immutableCheck: {
77+
ignoredPaths: ['carto.viewportFeatures'],
78+
},
79+
serializableCheck: {
80+
ignoredPaths: ['carto.viewportFeatures'],
81+
ignoredActions: ['carto/setViewportFeatures'],
82+
},
83+
};
7584

7685
const prodConfig = {
7786
immutableCheck: false,
@@ -80,7 +89,7 @@ function getCustomMiddleware() {
8089

8190
const isProductionEnv = process.env.NODE_ENV === 'production';
8291

83-
return isProductionEnv ? getDefaultMiddleware(prodConfig) : getDefaultMiddleware();
92+
return getDefaultMiddleware(isProductionEnv ? prodConfig : devConfig);
8493
}
8594

8695
// Configure the store

0 commit comments

Comments
 (0)