From 6e439c7eb522af65de7d522389569d56a6f92aca Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 7 Mar 2022 10:17:05 +0000 Subject: [PATCH 1/2] Properly remove window event listener when unmounting component preview --- .../AppPreview/CurrentItemPreview.svelte | 3 +- packages/client/stats.html | 2689 +++++++++++++++++ 2 files changed, 2691 insertions(+), 1 deletion(-) create mode 100644 packages/client/stats.html diff --git a/packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte b/packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte index 2a886fab0c..de50e0cfb2 100644 --- a/packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte +++ b/packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte @@ -134,8 +134,9 @@ // Remove all iframe event listeners on component destroy onDestroy(() => { + window.removeEventListener("message", receiveMessage) + if (iframe.contentWindow) { - window.removeEventListener("message", receiveMessage) if (!$store.clientFeatures.messagePassing) { // Legacy - remove in later versions of BB iframe.contentWindow.removeEventListener( diff --git a/packages/client/stats.html b/packages/client/stats.html new file mode 100644 index 0000000000..509a3b0175 --- /dev/null +++ b/packages/client/stats.html @@ -0,0 +1,2689 @@ + + + + + + + + RollUp Visualizer + + + +
+ + + + + From 5e28aa94abdd89bae7ea39426feb3cca64721f58 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 8 Mar 2022 08:43:33 +0000 Subject: [PATCH 2/2] Remove stats file --- packages/client/stats.html | 2689 ------------------------------------ 1 file changed, 2689 deletions(-) delete mode 100644 packages/client/stats.html diff --git a/packages/client/stats.html b/packages/client/stats.html deleted file mode 100644 index 509a3b0175..0000000000 --- a/packages/client/stats.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - - - RollUp Visualizer - - - -
- - - - -