"window is not defined"
maxgraze-zz opened this issue · 2 comments
maxgraze-zz commented
konstantinmuenster commented
Hi!
Did you add custom code to the layout.js
file? Cause I couldn't find the code snippet you posted.
In general, window
is not available during build time hence it should be wrapped in an isSSR
condition like here: https://github.com/konstantinmuenster/gatsby-starter-portfolio-minimal/blob/master/src/components/header.js#L82.
Maybe that already solves your issue?
konstantinmuenster commented
Closed due to inactivity.