Skip to content

Commit

Permalink
wait for workflow to load before closing loading indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicBlueberry committed Nov 7, 2023
1 parent a61650a commit 3422161
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions client/src/components/Workflow/Editor/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ export default {
this.$emit("update:confirmation", this.hasChanges);
},
},
created() {
async created() {
this.lastQueue = new LastQueue();
this._loadCurrent(this.id, this.version);
await this._loadCurrent(this.id, this.version);
hide_modal();
},
methods: {
Expand Down Expand Up @@ -730,19 +730,18 @@ export default {
await Vue.nextTick();
this.hasChanges = has_changes;
},
_loadCurrent(id, version) {
async _loadCurrent(id, version) {
if (!this.isNewTempWorkflow) {
this.resetStores();
this.onWorkflowMessage("Loading workflow...", "progress");
this.lastQueue
.enqueue(loadWorkflow, { id, version })
.then((data) => {
fromSimple(id, data);
this._loadEditorData(data);
})
.catch((response) => {
this.onWorkflowError("Loading workflow failed...", response);
});
try {
const data = await this.lastQueue.enqueue(loadWorkflow, { id, version });
await fromSimple(id, data);
await this._loadEditorData(data);
} catch (e) {
this.onWorkflowError("Loading workflow failed...", e);
}
}
},
onTags(tags) {
Expand Down

0 comments on commit 3422161

Please sign in to comment.