Skip to content

Commit

Permalink
Additional check for flattenObject
Browse files Browse the repository at this point in the history
  • Loading branch information
howard-e committed Nov 27, 2023
1 parent 74a6f1a commit 8dd8119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/scripts/import-tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const flattenObject = (obj, parentKey = '') => {
const flattened = {};

for (const key in obj) {
if (typeof obj[key] === 'object') {
if (typeof obj[key] === 'object' && obj[key] !== null) {
const subObject = flattenObject(obj[key], parentKey + key + '.');
Object.assign(flattened, subObject);
} else {
Expand Down

0 comments on commit 8dd8119

Please sign in to comment.