Skip to content

Commit

Permalink
fix: null/undefined check for global tool history checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyrb committed Jul 4, 2019
1 parent 1397a9c commit 8ac261c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/store/setToolMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,14 @@ function _trackGlobalToolModeChange(mode, toolName, options, interactionTypes) {
// Update ActiveBindings Array
const globalTool = store.state.globalTools[toolName];

if (!globalTool) {
logger.warn(
`setToolMode call for tool that's not available globally: ${toolName}`
);

return;
}

if (mode === 'active') {
let stringBindings = _determineStringBindings(
toolName,
Expand Down

0 comments on commit 8ac261c

Please sign in to comment.