diff --git a/src/workers/rmData.worker.ts b/src/workers/rmData.worker.ts index 460cd2f..795fbfd 100644 --- a/src/workers/rmData.worker.ts +++ b/src/workers/rmData.worker.ts @@ -222,6 +222,11 @@ function pickAutoZoneIdByPriority(options: ZoneOptionItem[], historyZoneId: stri return living.value; } + const ended = [...options].reverse().find((item) => item.state === 'ended'); + if (ended) { + return ended.value; + } + const offline = options.find((item) => item.state === 'offline'); if (offline) { return offline.value;