diff --git a/packages/gatsby/cache-dir/fast-refresh-overlay/index.js b/packages/gatsby/cache-dir/fast-refresh-overlay/index.js index f00008be01034..b8253a129a8b3 100644 --- a/packages/gatsby/cache-dir/fast-refresh-overlay/index.js +++ b/packages/gatsby/cache-dir/fast-refresh-overlay/index.js @@ -54,7 +54,7 @@ function DevOverlay({ children }) { const [state, dispatch] = React.useReducer(reducer, initialState) React.useEffect(() => { - const gatsbyEvents = window._gatsbyEvents + const gatsbyEvents = window._gatsbyEvents || [] window._gatsbyEvents = { push: ([channel, event]) => { if (channel === `FAST_REFRESH`) {