Skip to content

Commit 4f61d40

Browse files
committed
correct typeof check
1 parent 73895b4 commit 4f61d40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ai/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export function getGenerativeModel(
129129
*/
130130
const chromeAdapter = (ai as AIService).chromeAdapterFactory?.(
131131
hybridParams.mode,
132-
typeof window && window,
132+
typeof window === 'undefined' ? undefined : window,
133133
hybridParams.onDeviceParams
134134
);
135135

0 commit comments

Comments
 (0)