Skip to content

Commit 279de18

Browse files
committed
Fix possible null type
1 parent 5e8ac10 commit 279de18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/components/InferencePlayground/InferencePlayground.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
const endTime = performance.now();
129129
latency = Math.round(endTime - startTime);
130130
} catch (error) {
131-
if (conversation.messages.at(-1)?.role === "assistant" && !conversation.messages.at(-1)?.content.trim()) {
131+
if (conversation.messages.at(-1)?.role === "assistant" && !conversation.messages.at(-1)?.content?.trim()) {
132132
conversation.messages.pop();
133133
conversation.messages = [...conversation.messages];
134134
}

0 commit comments

Comments
 (0)