fix(editor): More securely clear executions tab auto refresh timer (#7685)

This commit is contained in:
Csaba Tuncsik 2023-11-10 14:51:49 +01:00 committed by GitHub
parent d2d11e0208
commit 37dd658dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,6 +139,7 @@ export default defineComponent({
},
},
async beforeRouteLeave(to, from, next) {
this.stopAutoRefreshInterval();
if (getNodeViewTab(to) === MAIN_HEADER_TABS.WORKFLOW) {
next();
return;
@ -350,6 +351,7 @@ export default defineComponent({
async startAutoRefreshInterval() {
if (this.autoRefresh) {
await this.loadAutoRefresh();
this.stopAutoRefreshInterval();
this.autoRefreshTimeout = setTimeout(() => {
void this.startAutoRefreshInterval();
}, 4000);