From 09dc17ca6a24fbbf30729424775cc82610df43df Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 6 Dec 2021 18:00:19 +0000 Subject: [PATCH] Add console error to builder when iframe preview receives invalid JSON to aid in debugging some cases of endless loading apps --- .../builder/src/components/design/AppPreview/iframeTemplate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/src/components/design/AppPreview/iframeTemplate.js b/packages/builder/src/components/design/AppPreview/iframeTemplate.js index e8c563db9f..15321c5eff 100644 --- a/packages/builder/src/components/design/AppPreview/iframeTemplate.js +++ b/packages/builder/src/components/design/AppPreview/iframeTemplate.js @@ -49,6 +49,7 @@ export default ` try { parsed = JSON.parse(event.data) } catch (error) { + console.error("Client received invalid JSON") // Ignore } if (!parsed) {