diff --git a/web/app/src/components/footer/TaskLog.vue b/web/app/src/components/footer/TaskLog.vue index 40ccc099..0bbbfd45 100644 --- a/web/app/src/components/footer/TaskLog.vue +++ b/web/app/src/components/footer/TaskLog.vue @@ -34,10 +34,7 @@ onMounted(() => { tabulator.on("tableBuilt", _subscribeToPinia); console.log("Task log list: mounted on task ID", tasks.activeTaskID); - if (tasks.activeTaskID) - _fetchLogTail(tasks.activeTaskID); - else - taskLog.clear(); + _fetchLogTail(tasks.activeTaskID); }); onUnmounted(() => { taskLog.clear(); @@ -62,6 +59,8 @@ function _subscribeToPinia() { function _fetchLogTail(taskID) { taskLog.clear(); + if (!taskID) return; + const jobsAPI = new API.JobsApi(apiClient); return jobsAPI.fetchTaskLogTail(taskID) .then((logTail) => {