fix: skip loading related tasks for subtasks to prevent request spam

This commit is contained in:
kuaifan 2025-12-19 19:37:07 +08:00
parent 17fd7f02a6
commit 203d107d68

View File

@ -1563,6 +1563,10 @@ export default {
this.relatedTasks = []; this.relatedTasks = [];
return; return;
} }
if (this.isSubTask) {
this.relatedTasks = [];
return;
}
const cacheMap = this.$store.state.taskRelatedCache || {}; const cacheMap = this.$store.state.taskRelatedCache || {};
const cached = cacheMap[this.taskId]; const cached = cacheMap[this.taskId];
if (cached?.list) { if (cached?.list) {
@ -1597,6 +1601,9 @@ export default {
if (!taskId || taskId !== this.taskId) { if (!taskId || taskId !== this.taskId) {
return; return;
} }
if (this.isSubTask) {
return;
}
this.loadRelatedTasks(); this.loadRelatedTasks();
}, },