Skip to content

Commit

Permalink
Tweak devtools options setup to hopefully work better in IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Oct 17, 2019
1 parent d5397aa commit 0be4ea9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/configureStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ export function configureStore<S = any, A extends Action = AnyAction>(
let finalCompose = compose

if (devTools) {
finalCompose = composeWithDevTools({
// Enable capture of stack traces for dispatched Redux actions
trace: !IS_PRODUCTION,
...(typeof devTools === 'object' && devTools)
})
const devToolsOptions: DevToolsOptions = Object.assign(
{
// Enable capture of stack traces for dispatched Redux actions
trace: !IS_PRODUCTION
},
typeof devTools === 'object' ? devTools : {}
)

finalCompose = composeWithDevTools(devToolsOptions)
}

let storeEnhancers: StoreEnhancer[] = [middlewareEnhancer]
Expand Down

0 comments on commit 0be4ea9

Please sign in to comment.