Skip to content

Commit

Permalink
fix: set id to alias when adding commands (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Mar 17, 2022
1 parent b239702 commit 84ab722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/config.ts
Expand Up @@ -615,9 +615,9 @@ export class Config implements IConfig {
for (const alias of command.aliases ?? []) {
if (this._commands.has(alias)) {
const prioritizedCommand = this.determinePriority([this._commands.get(alias)!, command])
this._commands.set(prioritizedCommand.id, prioritizedCommand)
this._commands.set(prioritizedCommand.id, {...prioritizedCommand, id: alias})
} else {
this._commands.set(alias, command)
this._commands.set(alias, {...command, id: alias})
}

const aliasPermutations = this.flexibleTaxonomy ? getCommandIdPermutations(alias) : [alias]
Expand Down

0 comments on commit 84ab722

Please sign in to comment.