Skip to content

Commit a0f3f1b

Browse files
adityathebemoshloop
authored andcommitted
fix: playbook results rendering
we tried to render objects as markdown.
1 parent b5b8c1c commit a0f3f1b

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/components/Playbooks/Runs/Actions/PlaybooksActionsResults.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,17 @@ function renderTabContent(key: string, content: any, className: string) {
274274
const artifact = content as PlaybookArtifact;
275275
return <ArtifactContent artifact={artifact} className={className} />;
276276
default:
277-
return <DisplayMarkdown className={className} md={content} />;
277+
if (typeof content === "string") {
278+
return <DisplayMarkdown className={className} md={content} />;
279+
}
280+
281+
return (
282+
<pre className={className}>
283+
<Linkify as="p" options={options}>
284+
{JSON.stringify(content, null, 2)}
285+
</Linkify>
286+
</pre>
287+
);
278288
}
279289
}
280290

0 commit comments

Comments
 (0)