Merge pull request #148 from Permissionless-Software-Foundation/dh-fix-redux

fix(redux): Fixed gatsby-ipfs-web-wallet redux error
This commit is contained in:
Chris Troutner
2021-06-15 07:45:30 -07:00
committed by GitHub
+7 -4
View File
@@ -116,8 +116,9 @@ const initialState = {
data: null data: null
} }
} }
let createStore
const createStore = () => typeof window !== 'undefined'
? (createStore = () =>
reduxCreateStore( reduxCreateStore(
reducer, reducer,
initialState, initialState,
@@ -125,6 +126,8 @@ const createStore = () =>
* https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=es * https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=es
* *
*/ */
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() window.__REDUX_DEVTOOLS_EXTENSION__ &&
) window.__REDUX_DEVTOOLS_EXTENSION__()
))
: (createStore = () => reduxCreateStore(reducer, initialState))
export default createStore export default createStore