Skip to content

Commit d066f8b

Browse files
authoredSep 30, 2016
Added alert to install redux devtool (#1228)
* Added alert to install redux devtool * Change to warning
1 parent aa5bbe6 commit d066f8b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
 

‎caravel/assets/javascripts/reduxUtils.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,15 @@ export function addToArr(state, arrKey, obj) {
6767
export function enhancer() {
6868
let enhancerWithPersistState = compose(persistState());
6969
if (process.env.NODE_ENV === 'dev') {
70-
enhancerWithPersistState = compose(
71-
persistState(), window.devToolsExtension && window.devToolsExtension()
72-
);
70+
if (window.devToolsExtension) {
71+
enhancerWithPersistState = compose(
72+
persistState(), window.devToolsExtension && window.devToolsExtension()
73+
);
74+
} else {
75+
console.warn('You may encounter errors unless' +
76+
'you have Redux Devtool Extension installed: ' +
77+
'http://github.com/zalmoxisus/redux-devtools-extension');
78+
}
7379
}
7480
return enhancerWithPersistState;
7581
}

0 commit comments

Comments
 (0)
Please sign in to comment.