Skip to content

Commit

Permalink
Merge pull request #537 from noseglid/conditional-atomCommandName
Browse files Browse the repository at this point in the history
Only register atomCommandName if it exists
  • Loading branch information
noseglid authored Oct 2, 2017
2 parents 6f66408 + 4ea04d3 commit 4885b55
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 4885b55

Please sign in to comment.