From 41dbd788a9dd4570efdfb9325ea4e77f9669f090 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 14 Feb 2021 20:08:51 +0100 Subject: [PATCH] Fix setCurrentHistoryId in legacy history panel context If we create a new history in the legacy history the store does not get updated, so https://github.com/galaxyproject/galaxy/blame/3f47effa087f4049132da65643396d58a2be51d1/client/src/components/History/model/historyStore.js#L48 will always return the most recently used history. This is a little silly in that we will load the history twice, but we don't switch the history so often that it should matter. --- .../src/components/History/model/syncCurrentHistoryToGalaxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/History/model/syncCurrentHistoryToGalaxy.js b/client/src/components/History/model/syncCurrentHistoryToGalaxy.js index 7834bd84dec..93481d2e86d 100644 --- a/client/src/components/History/model/syncCurrentHistoryToGalaxy.js +++ b/client/src/components/History/model/syncCurrentHistoryToGalaxy.js @@ -30,7 +30,7 @@ export function syncCurrentHistoryToGalaxy(galaxy$, store, cfg = {}) { ); return historyId$.subscribe( - (id) => store.commit("betaHistory/setCurrentHistoryId", id), + (id) => store.dispatch("betaHistory/setCurrentHistoryId", id), (err) => console.warn("syncCurrentHistoryToGalaxy error", err), () => console.log("syncCurrentHistoryToGalaxy complete") );