mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-03 15:00:24 +00:00
fix(app): guard session-header current() against undefined when options is empty (#16478)
This commit is contained in:
parent
66fcab7b08
commit
f0beb38f91
1 changed files with 6 additions and 1 deletions
|
|
@ -303,7 +303,12 @@ export function SessionHeader() {
|
|||
})
|
||||
|
||||
const canOpen = createMemo(() => platform.platform === "desktop" && !!platform.openPath && server.isLocal())
|
||||
const current = createMemo(() => options().find((o) => o.id === prefs.app) ?? options()[0])
|
||||
const current = createMemo(
|
||||
() =>
|
||||
options().find((o) => o.id === prefs.app) ??
|
||||
options()[0] ??
|
||||
({ id: "finder", label: fileManager().label, icon: fileManager().icon } as const),
|
||||
)
|
||||
const opening = createMemo(() => openRequest.app !== undefined)
|
||||
|
||||
const selectApp = (app: OpenApp) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue