From f15484730567073b54ba3738c80b7f9d084c491c Mon Sep 17 00:00:00 2001 From: Chris Sandvik Date: Thu, 27 Oct 2022 14:58:12 -0400 Subject: [PATCH] Fix the grouping of a nullish coalless --- src/use-chakra-select-props.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/use-chakra-select-props.ts b/src/use-chakra-select-props.ts index ce30a03..429f705 100644 --- a/src/use-chakra-select-props.ts +++ b/src/use-chakra-select-props.ts @@ -55,7 +55,7 @@ const useChakraSelectProps = < menuIsOpen ?? (inputProps.readOnly ? false : undefined); /** Ensure that the size used is one of the options, either `sm`, `md`, or `lg` */ - let realSize: Size = size ?? defaultSize === "xs" ? "sm" : defaultSize; + let realSize: Size = size ?? (defaultSize === "xs" ? "sm" : defaultSize); const sizeOptions: Size[] = ["sm", "md", "lg"]; if (!sizeOptions.includes(realSize)) { realSize = "md";