Skip to content

Commit 969619c

Browse files
committed
Check if window.devToolsOptions was injected
Related to #589
1 parent 0f14bb5 commit 969619c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/api/filters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const noFiltersApplied = (localFilter) => (
2525
export function isFiltered(action, localFilter) {
2626
if (noFiltersApplied(localFilter) || typeof action.type.match !== 'function') return false;
2727

28-
const { whitelist, blacklist } = localFilter || window.devToolsOptions;
28+
const { whitelist, blacklist } = localFilter || window.devToolsOptions || {};
2929
return (
3030
whitelist && !action.type.match(whitelist) ||
3131
blacklist && action.type.match(blacklist)

src/browser/extension/inject/pageScript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ const __REDUX_DEVTOOLS_EXTENSION__ = function(reducer, preloadedState, config) {
235235
}
236236

237237
const getMaxAge = () => {
238-
return config && config.maxAge || window.devToolsOptions.maxAge || 50;
238+
return config && config.maxAge || window.devToolsOptions && window.devToolsOptions.maxAge || 50;
239239
};
240240

241241
function init() {

0 commit comments

Comments
 (0)