Fix empty JSON bug
This commit is contained in:
parent
527c506579
commit
88fd79757b
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue