We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd42c86 commit 6b32267Copy full SHA for 6b32267
src/components/HtmlFormat.tsx
@@ -19,7 +19,7 @@ export default function HtmlFormat(props: HtmlFormatProps) {
19
const isArray = useMemo(() => Array.isArray(value), [value])
20
const keyFmt = (s: string) => humanify(s)
21
const getAttrs = (k: string) => fieldAttrs ? fieldAttrs(k) : null
22
- const fields = useMemo(() => uniqueKeys(value), [value])
+ const fields = useMemo(() => isArray ? uniqueKeys(value) : [], [value, isArray])
23
const rows = (val: any) => val ? Object.keys(val).map(k => ({ key: keyFmt(k), val: val[k] })) : []
24
25
const formattedValue = useMemo(() => formatValue(value), [value])
0 commit comments