Skip to content

Commit

Permalink
remove redundant level check
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Sep 5, 2024
1 parent 7b6d019 commit 6cebf42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(
{ size = 'xl', level = 2, spacing = false, className, asChild, ...rest },
ref,
) => {
const Component = asChild ? Slot : (`h${level ?? 1}` as ElementType);
const Component = asChild ? Slot : (`h${level}` as ElementType);

return (
<Component
Expand Down

0 comments on commit 6cebf42

Please sign in to comment.