Skip to content

Commit

Permalink
Fix duplicate form registration (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmale authored Aug 28, 2024
1 parent 636d9cb commit 0984766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/provider/form-factory-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const FormFactoryProvider: React.FC<FormFactoryProviderProps> = ({
const registerForm = useCallback((formId: string, context: FormContextProps) => {
if (!rootForm.current) {
rootForm.current = context;
} else {
} else if (rootForm.current.formJson.name !== formId) {
subForms.current[formId] = context;
}
}, []);
Expand Down

0 comments on commit 0984766

Please sign in to comment.