Skip to content

Commit

Permalink
fix(fe): twice loading templates
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Oct 27, 2021
1 parent 001ddd3 commit 2a57122
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web2/src/views/project/Templates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2a57122

Please sign in to comment.