mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -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 isValid = !(meta.touched && meta.error);
|
||||
|
||||
const defaultRevertValue =
|
||||
config?.default !== null ? JSON.stringify(config.default, null, 2) : null;
|
||||
const defaultRevertValue = config?.default
|
||||
? JSON.stringify(config.default, null, 2)
|
||||
: null;
|
||||
|
||||
return config ? (
|
||||
<FormFullWidthLayout>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user