Skip to content

Commit 3f1a4ab

Browse files
authored
fix(app): use optional chaining for model.current() in ProviderIcon (#18927)
1 parent 431e058 commit 3f1a4ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/app/src/components/prompt-input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
14971497
>
14981498
<Show when={local.model.current()?.provider?.id}>
14991499
<ProviderIcon
1500-
id={local.model.current()!.provider.id}
1500+
id={local.model.current()?.provider?.id ?? ""}
15011501
class="size-4 shrink-0 opacity-40 group-hover:opacity-100 transition-opacity duration-150"
15021502
style={{ "will-change": "opacity", transform: "translateZ(0)" }}
15031503
/>
@@ -1529,7 +1529,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
15291529
>
15301530
<Show when={local.model.current()?.provider?.id}>
15311531
<ProviderIcon
1532-
id={local.model.current()!.provider.id}
1532+
id={local.model.current()?.provider?.id ?? ""}
15331533
class="size-4 shrink-0 opacity-40 group-hover:opacity-100 transition-opacity duration-150"
15341534
style={{ "will-change": "opacity", transform: "translateZ(0)" }}
15351535
/>

0 commit comments

Comments
 (0)