Skip to content

Commit

Permalink
Check if window.devToolsOptions was injected
Browse files Browse the repository at this point in the history
Related to #589
  • Loading branch information
zalmoxisus committed Nov 28, 2018
1 parent 0f14bb5 commit 969619c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/api/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const noFiltersApplied = (localFilter) => (
export function isFiltered(action, localFilter) {
if (noFiltersApplied(localFilter) || typeof action.type.match !== 'function') return false;

const { whitelist, blacklist } = localFilter || window.devToolsOptions;
const { whitelist, blacklist } = localFilter || window.devToolsOptions || {};
return (
whitelist && !action.type.match(whitelist) ||
blacklist && action.type.match(blacklist)
Expand Down
2 changes: 1 addition & 1 deletion src/browser/extension/inject/pageScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const __REDUX_DEVTOOLS_EXTENSION__ = function(reducer, preloadedState, config) {
}

const getMaxAge = () => {
return config && config.maxAge || window.devToolsOptions.maxAge || 50;
return config && config.maxAge || window.devToolsOptions && window.devToolsOptions.maxAge || 50;
};

function init() {
Expand Down

0 comments on commit 969619c

Please sign in to comment.