From 7f53f23619a756ac7bb90a6f7d156dad6362d914 Mon Sep 17 00:00:00 2001 From: Ward Peeters Date: Sun, 28 Feb 2021 12:56:56 +0100 Subject: [PATCH] fix(gatsby-plugin-preact): fix fast-refresh --- packages/gatsby/cache-dir/fast-refresh-overlay/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`) {