Fix empty JSON bug

This commit is contained in:
Crow Crowcrow 2018-05-03 14:27:55 +02:00
parent 527c506579
commit 88fd79757b
Signed by: Crow
GPG Key ID: 45A8E203AF859FD8

View File

@ -193,7 +193,7 @@ class Serializer {
}
} else {
let d = f.serialize();
if (f !== null) {
if (d !== null) {
if (k == "") {
json = d;
continue;
@ -202,8 +202,7 @@ class Serializer {
}
}
}
return json;
}
return Object.keys(json).length > 0 ? json : null;}
}
class Validator {