Skip to content

Commit

Permalink
reload if window is navigated to/from new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicBlueberry committed Dec 10, 2024
1 parent 053e962 commit 0eb2fbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/entry/analysis/modules/WorkflowEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default {
version: null,
editorConfig: null,
editorReloadKey: 0,
previousHistoryLength: 0,
};
},
watch: {
Expand All @@ -39,14 +40,18 @@ export default {
async getEditorConfig() {
let reloadEditor = true;
const noStoredIds = !this.storedWorkflowId && !this.workflowId;
const historyNavigatedForwards = window.history.length > this.previousHistoryLength;
// this will only be the case the first time the route updates from a new workflow
if (!this.storedWorkflowId && !this.workflowId) {
if (noStoredIds && historyNavigatedForwards) {
reloadEditor = false;
}
this.storedWorkflowId = Query.get("id");
this.workflowId = Query.get("workflow_id");
this.version = Query.get("version");
this.previousHistoryLength = window.history.length;
const params = {};
Expand Down

0 comments on commit 0eb2fbb

Please sign in to comment.