diff --git a/packages/ui/src/Radio/RadioGroup.tsx b/packages/ui/src/Radio/RadioGroup.tsx index c7be37a..2b8eb47 100644 --- a/packages/ui/src/Radio/RadioGroup.tsx +++ b/packages/ui/src/Radio/RadioGroup.tsx @@ -15,20 +15,7 @@ export const RadioGroupContext = createContext(nu export const useRadioGroup = () => { const context = useContext(RadioGroupContext); if (!context) { - // During SSR/prerendering, context might not be available yet - // Only throw during actual runtime (browser or test environment) - if (typeof window !== 'undefined' || process.env.NODE_ENV === 'test') { - throw new Error('Radio must be used within a RadioGroup'); - } - // Return default values for SSR/prerendering - return { - name: '', - value: undefined, - onChange: () => {}, - state: 'default' as const, - size: 'md' as const, - disabled: false, - }; + throw new Error('Radio must be used within a RadioGroup'); } return context; };