Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nicholas J Anderson
whats-open-web
Commits
a50bf1b1
Commit
a50bf1b1
authored
Jan 19, 2018
by
Andrew Hrdy
Browse files
Fixed error with compose in index.js.
parent
b50d4f42
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/index.js
View file @
a50bf1b1
...
...
@@ -19,7 +19,12 @@ const history = createHistory();
const
extension
=
window
.
__REDUX_DEVTOOLS_EXTENSION__
&&
window
.
__REDUX_DEVTOOLS_EXTENSION__
();
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
enhance
=
compose
(
applyMiddleware
(
ReduxThunk
,
routerMiddleware
(
history
)),
!
isProduction
&&
extension
);
let
enhance
;
if
(
isProduction
)
{
enhance
=
compose
(
applyMiddleware
(
ReduxThunk
,
routerMiddleware
(
history
)));
}
else
{
enhance
=
compose
(
applyMiddleware
(
ReduxThunk
,
routerMiddleware
(
history
)),
extension
);
}
if
(
isProduction
)
{
window
.
dataLayer
=
window
.
dataLayer
||
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment