Skip to content

Commit

Permalink
fix: update redux middleware in skeleton (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriSolid authored Mar 12, 2021
1 parent fbc20eb commit fb7dad8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

## 1.0.0-rc.1 (2021-03-11)
- Add cypress e2e tests in CI [#194](https://github.com/CartoDB/carto-react-template/pull/194)
Expand Down
11 changes: 10 additions & 1 deletion template-skeleton/template/src/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ const staticReducers = {
};

function getCustomMiddleware() {
const devConfig = {
immutableCheck: {
ignoredPaths: ['carto.viewportFeatures'],
},
serializableCheck: {
ignoredPaths: ['carto.viewportFeatures'],
ignoredActions: ['carto/setViewportFeatures'],
},
};

const prodConfig = {
immutableCheck: false,
Expand All @@ -80,7 +89,7 @@ function getCustomMiddleware() {

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

return isProductionEnv ? getDefaultMiddleware(prodConfig) : getDefaultMiddleware();
return getDefaultMiddleware(isProductionEnv ? prodConfig : devConfig);
}

// Configure the store
Expand Down

1 comment on commit fb7dad8

@vercel
Copy link

@vercel vercel bot commented on fb7dad8 Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.