mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
interpret empty codemirror json content as empty object
This commit is contained in:
parent
e9cf1475ca
commit
8e48a3a523
@ -94,8 +94,12 @@ export default
|
||||
// convert json to yaml
|
||||
try {
|
||||
removeField(fld);
|
||||
let jsonString = scope[fld];
|
||||
if (jsonString.trim() === '') {
|
||||
jsonString = '{}';
|
||||
}
|
||||
|
||||
json_obj = JSON.parse(scope[fld]);
|
||||
json_obj = JSON.parse(jsonString);
|
||||
if ($.isEmptyObject(json_obj)) {
|
||||
scope[fld] = '---';
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user