Skip to content

Commit 7578448

Browse files
committed
fixed lint error
1 parent 94c459b commit 7578448

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

packages/sdk/src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,23 @@ function parseVercelAIStreamData(rawBody: string): { documentChatThreadID?: stri
5858
let documentChatThreadID: string | undefined;
5959

6060
for (const line of rawBody.split('\n')) {
61-
if (!line.startsWith('2:')) { continue; }
61+
if (!line.startsWith('2:')) {
62+
continue;
63+
}
6264
try {
6365
const items: unknown[] = JSON.parse(line.slice(2));
6466
for (const item of items) {
6567
if (item && typeof item === 'object' && 'documentChatThreadID' in item) {
66-
documentChatThreadID = (item as Record<string, unknown>)
67-
.documentChatThreadID as string;
68+
documentChatThreadID = (item as Record<string, unknown>).documentChatThreadID as string;
6869
break;
6970
}
7071
}
7172
} catch {
7273
// ignore malformed lines
7374
}
74-
if (documentChatThreadID) { break; }
75+
if (documentChatThreadID) {
76+
break;
77+
}
7578
}
7679

7780
return { documentChatThreadID };

0 commit comments

Comments
 (0)