Skip to content

Commit c48d071

Browse files
authored
Merge pull request #178 from akkeris/COBRA-4055-maintenance-mode-audit
display bool as string, empty as n/a on audits
2 parents ed9b8f9 + 6c46409 commit c48d071

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/Audits/index.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,23 @@ function sillyfunc(prefix, input) {
5555
if (typeof input[key] === 'object') {
5656
return sillyfunc(prefix ? `${prefix}.${key}` : key, input[key]);
5757
}
58+
59+
let value;
60+
if (input[key] === '') {
61+
value = 'n/a';
62+
} else if (typeof input[key] === 'boolean') {
63+
value = input[key].toString();
64+
} else {
65+
value = input[key];
66+
}
67+
5868
return (
5969
<TableRow key={key}>
6070
<TableCell>
6171
<span>{prefix ? `${prefix}.${key}` : key}</span>
6272
</TableCell>
6373
<TableCell>
64-
<span>{input[key]}</span>
74+
<span>{value}</span>
6575
</TableCell>
6676
</TableRow>
6777
);

0 commit comments

Comments
 (0)