Skip to content

Commit

Permalink
🐛 throws an error on server when imported
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Jun 6, 2024
1 parent d2c05e1 commit 67ab10c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/savedAvailableLengthGuess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function isDevToolsOpen(): boolean {
return guessDevToolsWidth() !== undefined;
}

updateAvailableLength();
if (typeof window !== "undefined") {
updateAvailableLength();
window.addEventListener("resize", updateAvailableLength);
}

0 comments on commit 67ab10c

Please sign in to comment.