Null check

This commit is contained in:
rxdn 2022-06-27 21:50:05 +01:00
parent 9818bad95e
commit b6f502b633

View File

@ -136,7 +136,7 @@
Object.keys(obj).forEach(key => { Object.keys(obj).forEach(key => {
if (typeof obj[key] === 'string' && obj[key] === '') { if (typeof obj[key] === 'string' && obj[key] === '') {
obj[key] = null; obj[key] = null;
} else if (typeof obj[key] === 'object') { } else if (typeof obj[key] === 'object' && obj[key] !== null && obj[key] !== undefined) {
mapper(obj[key]); mapper(obj[key]);
} }
}); });