From 6ddf5fd573e76b3e9b228a98d86c4c765ebfd2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Herrmann?= Date: Fri, 25 Sep 2020 12:36:22 +0200 Subject: [PATCH] Added missing timeout (#9) --- gatsby.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gatsby.js b/gatsby.js index f6bcad1..a05d426 100644 --- a/gatsby.js +++ b/gatsby.js @@ -14,8 +14,9 @@ Cypress.on('window:load', (win) => { } const source = new EventSource(`${baseUrl}/__webpack_hmr`); - source.onopen = () => console.debug(LOG_TAG, 'Connected to HMR event source'); + let timeout; + source.onopen = () => console.debug(LOG_TAG, 'Connected to HMR event source'); source.addEventListener('message', function (e) { const { action } = JSON.parse(e.data); switch (action) {