From 3d36024e1750b77649ab07fc107b5268c296a65d Mon Sep 17 00:00:00 2001 From: JustEvil <71156616+EvilG-MC@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:30:18 -0600 Subject: [PATCH] fix: truco (#258) --- src/commands/optionresolver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/optionresolver.ts b/src/commands/optionresolver.ts index 321fa07..619c525 100644 --- a/src/commands/optionresolver.ts +++ b/src/commands/optionresolver.ts @@ -74,7 +74,7 @@ export class OptionResolver { } getAutocomplete() { - return (this.getCommand()?.options as CommandOption[]).find( + return (this.getCommand()?.options as CommandOption[] | undefined)?.find( option => option.name === this.hoistedOptions.find(x => x.focused)?.name, ) as CommandAutocompleteOption | undefined; }