diff --git a/packages/ui/primitives/stepper.tsx b/packages/ui/primitives/stepper.tsx index 795304e8c..35086ff17 100644 --- a/packages/ui/primitives/stepper.tsx +++ b/packages/ui/primitives/stepper.tsx @@ -56,7 +56,9 @@ export const Stepper: FC = ({ }, [currentStep, onStepChanged]); // Empty stepper - if (totalSteps === 0) return null; + if (totalSteps === 0) { + return null; + } const currentChild = React.Children.toArray(children)[currentStep - 1]; @@ -76,6 +78,8 @@ export const Stepper: FC = ({ /** Hook for children to use the step context */ export const useStep = (): StepContextType => { const context = useContext(StepContext); - if (!context) throw new Error('useStep must be used within a Stepper'); + if (!context) { + throw new Error('useStep must be used within a Stepper'); + } return context; };