From 5ba1e86672d1fcfe48660024312eaacc532bd82f Mon Sep 17 00:00:00 2001 From: jumpyapple <70656949+jumpyapple@users.noreply.github.com> Date: Wed, 3 Mar 2021 02:46:47 -0500 Subject: [PATCH] fix: window is not available during gatsby build Check if window is available, and set initial value for `state.scrollY`. --- src/components/HeaderBarebone/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/HeaderBarebone/index.tsx b/src/components/HeaderBarebone/index.tsx index edd4210..17bc6e4 100644 --- a/src/components/HeaderBarebone/index.tsx +++ b/src/components/HeaderBarebone/index.tsx @@ -39,7 +39,6 @@ const BoxedTitle: React.FC = (props) => { ) } - const debounce = (fn) => { let frame return (...params) => { @@ -57,12 +56,15 @@ export class HeaderBarebone extends Component