🔀 Merge pull request #476 from RicardoE105/feature/spritesheet-file-node

🐛 Crashes when property value is null
This commit is contained in:
Jan 2020-04-12 18:10:31 +02:00 committed by GitHub
commit 135e467be9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {