return the default step layout form if a custom one is not found
Signed-off-by: Paul Cowan <paul.cowan@cutting.scot>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { UiSchema } from '@rjsf/core';
|
||||
import { DefaultStepFormLayout } from '../components/layouts/DefaultStepFormLayout';
|
||||
import { DEFAULT_SCAFFOLDER_LAYOUT } from './default';
|
||||
import { LayoutOptions, LayoutTemplate } from './types';
|
||||
|
||||
@@ -31,7 +32,7 @@ export function resolveStepLayout(
|
||||
)?.component;
|
||||
|
||||
if (!LayoutComponent) {
|
||||
throw new Error(`no step layout found for ${layoutName}`);
|
||||
return DefaultStepFormLayout;
|
||||
}
|
||||
|
||||
return LayoutComponent;
|
||||
|
||||
Reference in New Issue
Block a user