From ff09595fa324ab692c069225d20a3105dc2e666f Mon Sep 17 00:00:00 2001 From: thomasrosen Date: Tue, 22 Nov 2022 01:31:52 +0100 Subject: [PATCH] fix: check if function exists before using it --- frontend/_DATA_.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/_DATA_.js b/frontend/_DATA_.js index 6e78616..e7aecfb 100644 --- a/frontend/_DATA_.js +++ b/frontend/_DATA_.js @@ -529,7 +529,7 @@ try { module.exports = _DATA_ } } catch (error) { - if (!!_DATA_GOT_LOADED) { + if (window.hasOwnProperty('_DATA_GOT_LOADED') && typeof window._DATA_GOT_LOADED === 'function') { _DATA_GOT_LOADED() } }