mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
fix TypeError when config is undefined (#12697)
This commit is contained in:
parent
310e354164
commit
39f6e2fa32
@ -440,8 +440,9 @@ const ObjectField = ({ name, config, revertValue, isRequired = false }) => {
|
|||||||
const [field, meta, helpers] = useField({ name, validate });
|
const [field, meta, helpers] = useField({ name, validate });
|
||||||
const isValid = !(meta.touched && meta.error);
|
const isValid = !(meta.touched && meta.error);
|
||||||
|
|
||||||
const defaultRevertValue =
|
const defaultRevertValue = config?.default
|
||||||
config?.default !== null ? JSON.stringify(config.default, null, 2) : null;
|
? JSON.stringify(config.default, null, 2)
|
||||||
|
: null;
|
||||||
|
|
||||||
return config ? (
|
return config ? (
|
||||||
<FormFullWidthLayout>
|
<FormFullWidthLayout>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user