Skip to content

Commit

Permalink
Merge pull request #19507 from davelopez/24.2_fix_type_issue_in_markd…
Browse files Browse the repository at this point in the history
…own_vue

[24.2] Fix workflowID assignment in Markdown.vue
  • Loading branch information
mvdbeek authored Feb 1, 2025
2 parents 48c9907 + f77d4c6 commit 382aac5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client/src/components/Markdown/Markdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default {
workflows: {},
invocations: {},
loading: true,
workflowID: "",
workflowID: undefined,
};
},
computed: {
Expand Down Expand Up @@ -159,7 +159,7 @@ export default {
return "unavailable";
},
workflowVersions() {
return this.getStoredWorkflowByInstanceId(this.workflowID);
return this.workflowID ? this.getStoredWorkflowByInstanceId(this.workflowID) : undefined;
},
version() {
return this.markdownConfig.generate_version || "Unknown Galaxy Version";
Expand All @@ -172,7 +172,9 @@ export default {
},
created() {
this.initConfig();
this.fetchWorkflowForInstanceId(this.workflowID);
if (this.workflowID) {
this.fetchWorkflowForInstanceId(this.workflowID);
}
},
methods: {
...mapActions(useWorkflowStore, ["getStoredWorkflowByInstanceId", "fetchWorkflowForInstanceId"]),
Expand All @@ -188,7 +190,7 @@ export default {
this.workflows = config.workflows || {};
this.invocations = config.invocations || {};
this.loading = false;
this.workflowID = Object.keys(this.markdownConfig.workflows)[0];
this.workflowID = Object.keys(this.markdownConfig?.workflows ?? {})[0];
}
},
splitMarkdown(markdown) {
Expand Down

0 comments on commit 382aac5

Please sign in to comment.