Skip to content

Commit 8f400df

Browse files
switching to original callback style
1 parent 594e98e commit 8f400df

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

frontend/packages/dev-console/src/components/import/deployImage-validation-utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ export const deployValidationSchema = (t: TFunction) =>
1818
project: projectNameValidationSchema,
1919
application: applicationNameValidationSchema,
2020
name: nameValidationSchema(t),
21-
isi: yup.object().when('registry', {
22-
is: 'internal',
23-
then: (schema) => schema.concat(isiValidationSchema(t)),
21+
isi: yup.object().when('registry', ([registry], schema) => {
22+
return registry === 'internal' ? schema.concat(isiValidationSchema(t)) : schema;
2423
}),
2524
serverless: serverlessValidationSchema(t),
2625
deployment: deploymentValidationSchema(t),

0 commit comments

Comments
 (0)