Merge branch 'master' into feature/america

This commit is contained in:
Patrick Fic
2023-02-22 08:06:29 -08:00
54 changed files with 118 additions and 18 deletions

View File

@@ -1,6 +1,10 @@
export default function UndefinedToNull(obj) {
export default function UndefinedToNull(obj, keys) {
Object.keys(obj).forEach((key) => {
if (keys && keys.indexOf(key) >= 0) {
if (obj[key] === undefined) obj[key] = null;
} else {
if (obj[key] === undefined) obj[key] = null;
}
});
return obj;
}