@@ -22,6 +22,7 @@ import {
|
||||
FIELD_EXTENSION_KEY,
|
||||
DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS,
|
||||
NextFieldExtensionOptions,
|
||||
FieldExtensionOptions,
|
||||
} from '../../extensions';
|
||||
|
||||
import { useElementFilter } from '@backstage/core-plugin-api';
|
||||
@@ -60,7 +61,7 @@ export const Router = (props: PropsWithChildren<NextRouterProps>) => {
|
||||
.selectByComponentData({
|
||||
key: FIELD_EXTENSION_WRAPPER_KEY,
|
||||
})
|
||||
.findComponentData<NextFieldExtensionOptions>({
|
||||
.findComponentData<FieldExtensionOptions | NextFieldExtensionOptions>({
|
||||
key: FIELD_EXTENSION_KEY,
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -96,9 +96,9 @@ export const Stepper = (props: StepperProps) => {
|
||||
|
||||
const returnedValidation = await validation(formData);
|
||||
|
||||
const hasErrors = Object.values(returnedValidation).some(i => {
|
||||
return i.__errors?.length! > 0 ?? false;
|
||||
});
|
||||
const hasErrors = Object.values(returnedValidation).some(
|
||||
i => i.__errors?.length,
|
||||
);
|
||||
|
||||
if (hasErrors) {
|
||||
setErrors(returnedValidation);
|
||||
|
||||
Reference in New Issue
Block a user