79625452

Date: 2025-05-16 15:02:30
Score: 1
Natty:
Report link

Check where window is used in your code or third-party libraries and guard it so it's only accessed on the client side.

//Wrong: causes error during build
const width = window.innerWidth;

//Right: guard with typeof check
if (typeof window !== 'undefined') {
  const width = window.innerWidth;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Niklas