Skip to content

Commit

Permalink
fix(dfts-helper): cookies throwing on server rendered code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dafnik committed Nov 20, 2024
1 parent 3b4e958 commit 5e97986
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/dfts-helper/src/lib/helper/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export function i_screenSize(): string {
}

export const i_cookieEnabled = () => {
if (typeof document === 'undefined') {
return false;
}
let cookieEnabled = navigator.cookieEnabled;

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

0 comments on commit 5e97986

Please sign in to comment.