Merge pull request #4820 from Budibase/fix/preview-event-callbacks
Properly remove window event listener when unmounting component preview
This commit is contained in:
commit
a4cf6b6197
|
@ -134,8 +134,9 @@
|
|||
|
||||
// Remove all iframe event listeners on component destroy
|
||||
onDestroy(() => {
|
||||
if (iframe.contentWindow) {
|
||||
window.removeEventListener("message", receiveMessage)
|
||||
|
||||
if (iframe.contentWindow) {
|
||||
if (!$store.clientFeatures.messagePassing) {
|
||||
// Legacy - remove in later versions of BB
|
||||
iframe.contentWindow.removeEventListener(
|
||||
|
|
Loading…
Reference in New Issue