@samitouri / QOSami-HFS / commits / 1a44b183

fix: (regression beta) error "reading alias" entering a console command that doesn't exist

Massimo Melina committed Oct 4, 2024 at 12:36 UTC 1a44b183fa254302cc81a00812e850d52aafe3ed
1 file changed +1 -1
src/commands.ts
+1 -1
@@ -33,7 +33,7 @@ function parseCommandLine(line: string) {
33 let [name, ...params] = line.trim().split(/ +/)
34 name = aliases[name!] || name
35 let cmd = (commands as any)[name!]
36 - if (cmd.alias)
36 + if (cmd?.alias)
37 cmd = (commands as any)[cmd.alias]
38 if (!cmd)
39 return console.error("cannot understand entered command, try 'help'")