Skip to content

Commit

Permalink
eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenHong committed Apr 16, 2024
1 parent 6c3b622 commit 0e3824e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/iframeResizer.js
Expand Up @@ -730,8 +730,10 @@
chkEvent(iframeId, 'onClosed', iframeId)
log(iframeId, '--')
removeIframeListeners(iframe)
destroyObserver && destroyObserver.disconnect()
destroyObserver = null
if (destroyObserver) {
destroyObserver.disconnect()
destroyObserver = null
}
}

function getPagePosition(iframeId) {
Expand Down Expand Up @@ -1133,7 +1135,7 @@

function createDestroyObserver(MutationObserver) {
if (!iframe.parentNode) {
return
return null
}

var destroyObserver = new MutationObserver(function (mutations) {
Expand Down

0 comments on commit 0e3824e

Please sign in to comment.