Skip to content

Commit

Permalink
feat: fix selectResultvariant is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
annacv committed Mar 26, 2024
1 parent cdedcde commit f7ae7c2
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@
* Callback to be called when a variant is selected.
*
* @public
* @returns The 'selectResultVariant' injection key.
*/
const selectResultVariant: ((variant: ResultVariant, level?: number) => void) | undefined =
useHybridInject(SELECT_RESULT_VARIANT_KEY as string);
const selectResultVariant:
| ((variant: ResultVariant, level?: number) => void)
| undefined = () => useHybridInject(SELECT_RESULT_VARIANT_KEY as string);
/**
* The original result, used to retrieve the available variants for the level.
Expand Down Expand Up @@ -134,7 +136,7 @@
* @internal
*/
const selectVariant = (variant: ResultVariant): void => {
selectResultVariant!(variant, props.level);
selectResultVariant(variant, props.level);
};
/**
Expand Down

0 comments on commit f7ae7c2

Please sign in to comment.