🐛 Crashes when property value is null

This commit is contained in:
ricardo 2020-04-12 11:58:49 -04:00
parent a3a1d9244d
commit d9864ad8c2

View file

@ -28,7 +28,7 @@ import {
function flattenObject (data: IDataObject) {
const returnData: IDataObject = {};
for (const key1 of Object.keys(data)) {
if ((typeof data[key1]) === 'object') {
if (data[key1] !== null && (typeof data[key1]) === 'object') {
const flatObject = flattenObject(data[key1] as IDataObject);
for (const key2 in flatObject) {
if (flatObject[key2] === undefined) {