Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: enable aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 7, 2018
1 parent 9b25d50 commit 96d4fc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class Config implements IConfig {
findCommand(id: string, opts: {must: true}): Command.Plugin
findCommand(id: string, opts?: {must: boolean}): Command.Plugin | undefined
findCommand(id: string, opts: {must?: boolean} = {}): Command.Plugin | undefined {
let command = this.commands.find(c => c.id === id)
let command = this.commands.find(c => c.id === id || c.aliases.includes(id))
if (command) return command
if (opts.must) error(`command ${id} not found`)
}
Expand Down

0 comments on commit 96d4fc4

Please sign in to comment.