Skip to content

Commit

Permalink
Merge pull request #1201 from htmlburger/1200/fix-blocks-preview
Browse files Browse the repository at this point in the history
Fix blocks preview (#1200)
  • Loading branch information
jorostoyanov authored Nov 13, 2023
2 parents 5db1f2b + aad6245 commit 4207b9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/core/fields/map/google-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GoogleMap extends Component {

resizeObserver.observe( this.node.current );

this.cancelResizeObserver = resizeObserver.disconnect;
this.observer = resizeObserver;
}

/**
Expand Down Expand Up @@ -68,7 +68,7 @@ class GoogleMap extends Component {
* @return {void}
*/
componentWillUnmount() {
this.cancelResizeObserver();
this.observer.disconnect();

window.google.maps.event.clearInstanceListeners( this.map );
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/fields/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RichTextField extends Component {

resizeObserver.observe( this.node.current );

this.cancelObserver = resizeObserver.disconnect;
this.observer = resizeObserver;
}
}

Expand All @@ -60,8 +60,8 @@ class RichTextField extends Component {
componentWillUnmount() {
clearTimeout( this.timer );

if ( typeof this.cancelObserver !== 'undefined' ) {
this.cancelObserver();
if ( typeof this.observer !== 'undefined' ) {
this.observer.disconnect();
}

this.destroyEditor();
Expand Down

0 comments on commit 4207b9f

Please sign in to comment.