Skip to content

Commit 5e97986

Browse files
committed
fix(dfts-helper): cookies throwing on server rendered code
1 parent 3b4e958 commit 5e97986

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libs/dfts-helper/src/lib/helper/browser.ts

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ export function i_screenSize(): string {
1010
}
1111

1212
export const i_cookieEnabled = () => {
13+
if (typeof document === 'undefined') {
14+
return false;
15+
}
1316
let cookieEnabled = navigator.cookieEnabled;
1417

1518
if (typeof navigator.cookieEnabled == 'undefined' && !cookieEnabled) {

0 commit comments

Comments
 (0)