Skip to content

Commit 453e59d

Browse files
fix flatten when obj is null
1 parent 4284f7e commit 453e59d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/tables/CippTable.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ export default function CippTable({
637637

638638
// Define the flatten function
639639
const flatten = (obj, prefix = '') => {
640+
if (obj === null) return {}
640641
return Object.keys(obj).reduce((output, key) => {
641642
const newKey = prefix ? `${prefix}.${key}` : key
642643
const value = obj[key] === null ? '' : obj[key]

0 commit comments

Comments
 (0)