This commit is contained in:
beabigegg
2025-08-17 17:48:19 +08:00
parent 6c406d082a
commit 957743d83a

View File

@@ -88,7 +88,8 @@ const ProcessingPage = () => {
useEffect(() => {
const intervalIds = Object.entries(tasks).map(([key, task]) => {
if (task && (task.state === 'PENDING' || task.state === 'PROGRESS')) {
// FIX: Ensure the task and its status_url exist before starting to poll
if (task && task.status_url && (task.state === 'PENDING' || task.state === 'PROGRESS')) {
const intervalId = setInterval(async () => {
try {
const updatedTask = await pollTaskStatus(task.status_url);