Skip to content

Commit a6a0262

Browse files
authored
fix(orchestrator): results card renders boolean values properly (#772)
* fix(orchestrator): results card renders boolean values properly Signed-off-by: Marek Libra <marek.libra@gmail.com> * changeset --------- Signed-off-by: Marek Libra <marek.libra@gmail.com>
1 parent ae861ac commit a6a0262

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-orchestrator': patch
3+
---
4+
5+
Fix Results card to render boolean values correctly.

workspaces/orchestrator/plugins/orchestrator/src/components/WorkflowResult.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ const WorkflowOutputs = ({
273273
[key: string]: any;
274274
}>((data, item) => {
275275
let value = item.value || '';
276-
if (typeof value !== 'string') {
276+
if (!['string', 'number', 'boolean'].includes(typeof value)) {
277277
// This is a workaround for malformed returned data. It should not happen if the sender does WorkflowResult validation properly.
278278
if (typeof value === 'object') {
279279
value = `Object: ${JSON.stringify(value)}`;

0 commit comments

Comments
 (0)