소스 검색

fix: add optional chaining to session_status access (#27247)

Brendan Allan 5 달 전
부모
커밋
3be65dff46
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/app/src/context/global-sync/child-store.ts

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

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