Skip to content

Commit

Permalink
fix flatten when obj is null
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jun 26, 2024
1 parent 4284f7e commit 453e59d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ export default function CippTable({

// Define the flatten function
const flatten = (obj, prefix = '') => {
if (obj === null) return {}
return Object.keys(obj).reduce((output, key) => {
const newKey = prefix ? `${prefix}.${key}` : key
const value = obj[key] === null ? '' : obj[key]
Expand Down

0 comments on commit 453e59d

Please sign in to comment.