From b349ab79a6638426a8ba95a646bfc52fb0aba8bc Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 19 Oct 2021 14:25:07 +0200 Subject: [PATCH] Fix type error --- www/unsafeiframe/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/unsafeiframe/main.js b/www/unsafeiframe/main.js index 5cecc11bf..c36d4f641 100644 --- a/www/unsafeiframe/main.js +++ b/www/unsafeiframe/main.js @@ -31,6 +31,7 @@ define([ // loading screen setup. var done = waitFor(); var onMsg = function (msg) { + if (!msg || !msg.data) { return; } var data = typeof(msg.data) === "object" ? msg.data : JSON.parse(msg.data); if (data.q !== 'READY') { return; } window.removeEventListener('message', onMsg);