From 540b77f2a60eaa8e90a46e3adf392edccc6f095a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 1 Nov 2020 10:55:21 +0100 Subject: [PATCH] Fix loading workflow version 0 Instead of checking that version is truth-y, check that version is an Integer. Fixes https://github.com/galaxyproject/galaxy/issues/10593 together with b2ab9a37029291ab9ec15ca72b89e1121cb0c29d. --- client/src/components/Workflow/Editor/modules/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Workflow/Editor/modules/services.js b/client/src/components/Workflow/Editor/modules/services.js index 07c4098e144..56b5ae8cc31 100644 --- a/client/src/components/Workflow/Editor/modules/services.js +++ b/client/src/components/Workflow/Editor/modules/services.js @@ -24,7 +24,7 @@ export async function getModule(request_data) { export async function loadWorkflow(workflow, id, version, appendData) { try { - const versionQuery = version ? `version=${version}` : ""; + const versionQuery = Number.isInteger(version) ? `version=${version}` : ""; const { data } = await axios.get(`${getAppRoot()}workflow/load_workflow?_=true&id=${id}&${versionQuery}`); fromSimple(workflow, data, appendData); return data;