Parcourir la source

fix: undefined err

Aiden Cline il y a 4 mois
Parent
commit
adbb6037ac
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

+ 1 - 0
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -147,6 +147,7 @@ export function Session() {
   // Auto-navigate to whichever session currently needs permission input
   createEffect(() => {
     const currentSession = session()
+    if (!currentSession) return
     const currentPermissions = permissions()
     let targetID = currentPermissions.length > 0 ? currentSession.id : undefined