Skip to content

Commit

Permalink
Only register atomCommandName if it exists
Browse files Browse the repository at this point in the history
Fixes #532
  • Loading branch information
noseglid committed Sep 14, 2017
1 parent 3941dc6 commit 4ea04d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/target-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class TargetManager extends EventEmitter {
setting.atomCommandName = `build:trigger:${setting.name}`;
}

pathTarget.subscriptions.add(atom.commands.add('atom-workspace', setting.atomCommandName, atomCommandName => this.emit('trigger', atomCommandName)));
if (setting.atomCommandName) {
pathTarget.subscriptions.add(atom.commands.add('atom-workspace', setting.atomCommandName, atomCommandName => this.emit('trigger', atomCommandName)));
}

if (setting.keymap) {
require('./google-analytics').sendEvent('keymap', 'registered', setting.keymap);
Expand Down

0 comments on commit 4ea04d3

Please sign in to comment.