Skip to content

Commit

Permalink
prevent crashes if result is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Aug 10, 2023
1 parent 73fe477 commit ccbc0f7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/tables/CippTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,17 @@ export default function CippTable({
{(massResults.length >= 1 || loopRunning) && (
<CCallout color="info">
{massResults.map((message, idx) => {
return <li key={idx}>{message.data.Results}</li>
return (
<li key={idx}>
{
// check if message.data.Results is an array, if it is, join it.

Array.isArray(message.data.Results)
? message.data?.Results
: message.data?.Results
}
</li>
)
})}
{loopRunning && (
<li>
Expand Down

0 comments on commit ccbc0f7

Please sign in to comment.