瀏覽代碼

refactor(app): clarify session_working logic in child-store (#27267)

Brendan Allan 3 月之前
父節點
當前提交
d93a06431e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      packages/app/src/context/global-sync/child-store.ts

+ 2 - 1
packages/app/src/context/global-sync/child-store.ts

@@ -209,7 +209,8 @@ export function createChildStoreManager(input: {
             sessionTotal: 0,
             sessionTotal: 0,
             session_status: {},
             session_status: {},
             session_working(id: string) {
             session_working(id: string) {
-              return this.session_status[id]?.type !== "idle"
+              const type = this.session_status[id]?.type
+              return (type ?? "idle") !== "idle"
             },
             },
             session_diff: {},
             session_diff: {},
             todo: {},
             todo: {},