1
0
Fork 0
mirror of synced 2024-09-30 17:18:14 +13:00

Properly remove window event listener when unmounting component preview

This commit is contained in:
Andrew Kingston 2022-03-07 10:17:05 +00:00
parent 89e4c59e3c
commit 6e439c7eb5
2 changed files with 2691 additions and 1 deletions

View file

@ -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(

2689
packages/client/stats.html Normal file

File diff suppressed because one or more lines are too long