Fix empty JSON bug
This commit is contained in:
parent
527c506579
commit
88fd79757b
|
@ -193,7 +193,7 @@ class Serializer {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let d = f.serialize();
|
let d = f.serialize();
|
||||||
if (f !== null) {
|
if (d !== null) {
|
||||||
if (k == "") {
|
if (k == "") {
|
||||||
json = d;
|
json = d;
|
||||||
continue;
|
continue;
|
||||||
|
@ -202,8 +202,7 @@ class Serializer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return json;
|
return Object.keys(json).length > 0 ? json : null;}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Validator {
|
class Validator {
|
||||||
|
|
Loading…
Reference in New Issue