mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 15:03:57 +08:00
fix: replace empty array with EMPTY_ITEMS in selectQueueItems and selectSchedulerProgress
This commit is contained in:
@@ -309,7 +309,7 @@ export const selectQueueSchedulerStatus = (state: QueueSchedulerStore): QueueSch
|
||||
|
||||
/** Select all queue items */
|
||||
export const selectQueueItems = (state: QueueSchedulerStore): QueueItem[] =>
|
||||
state?.items ?? [];
|
||||
state?.items ?? EMPTY_ITEMS;
|
||||
|
||||
/**
|
||||
* Select items that are ready to execute (status 'queued' or 'pending').
|
||||
@@ -347,7 +347,7 @@ export const selectExecutingItems = (state: QueueSchedulerStore): QueueItem[] =>
|
||||
*/
|
||||
export const selectSchedulerProgress = (state: QueueSchedulerStore): number => {
|
||||
if (!state) return 0;
|
||||
const items = state.items ?? [];
|
||||
const items = state.items ?? EMPTY_ITEMS;
|
||||
const total = items.length;
|
||||
if (total === 0) return 0;
|
||||
const terminal = items.filter(
|
||||
|
||||
Reference in New Issue
Block a user