From 2a57122c4c6f051de5c26545136b853470058f87 Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Thu, 28 Oct 2021 00:55:28 +0500 Subject: [PATCH] fix(fe): twice loading templates --- web2/src/views/project/Templates.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web2/src/views/project/Templates.vue b/web2/src/views/project/Templates.vue index de4321125..43333fe8a 100644 --- a/web2/src/views/project/Templates.vue +++ b/web2/src/views/project/Templates.vue @@ -290,7 +290,11 @@ export default { }, async onViewTabSelected(tabIndex) { - this.viewId = tabIndex >= this.views.length ? null : this.views[tabIndex].id; + const newViewId = tabIndex >= this.views.length ? null : this.views[tabIndex].id; + if (this.viewId === newViewId) { + return; + } + this.viewId = newViewId; this.viewItemsLoading = true; try { await this.loadItems();