Skip to content

Commit

Permalink
Make the default size getter not fail without a value
Browse files Browse the repository at this point in the history
  • Loading branch information
csandman committed Oct 12, 2024
1 parent 4ba519c commit fda76e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const getDefaultSize = (size: unknown): Size => {
export const useSize = (size: SizeProp | undefined): Size => {
const chakraContext = useChakraContext();
const defaultSize = getDefaultSize(
chakraContext.getRecipe("select").defaultSize
// TODO: This doesn't seem to work as expected
chakraContext.getSlotRecipe("select")?.defaultSize
);

// Ensure that the size used is one of the options, either `sm`, `md`, or `lg`
Expand Down

0 comments on commit fda76e5

Please sign in to comment.