Skip to content

Commit 913cc5b

Browse files
authored
Fix issue with not reseting userMetdata correctly (#2437)
1 parent 41ef3cf commit 913cc5b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/lib/layouts/workflow-run-layout.svelte

+5-2
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,26 @@
5252
};
5353
5454
const decodeUserMetadata = async (workflow: WorkflowExecution) => {
55+
const userMetadata = { summary: '', details: '' };
5556
try {
5657
if (workflow?.summary) {
5758
const decodedSummary = await decodeSingleReadablePayloadWithCodec(
5859
workflow.summary,
5960
);
6061
if (typeof decodedSummary === 'string') {
61-
$workflowRun.userMetadata.summary = decodedSummary;
62+
userMetadata.summary = decodedSummary;
6263
}
6364
}
6465
if (workflow?.details) {
6566
const decodedDetails = await decodeSingleReadablePayloadWithCodec(
6667
workflow.details,
6768
);
6869
if (typeof decodedDetails === 'string') {
69-
$workflowRun.userMetadata.details = decodedDetails;
70+
userMetadata.details = decodedDetails;
7071
}
7172
}
73+
74+
$workflowRun = { ...$workflowRun, userMetadata };
7275
} catch (e) {
7376
console.error('Error decoding user metadata', e);
7477
}

0 commit comments

Comments
 (0)