Skip to content

Commit b9f291d

Browse files
committed
chore/CPWP-2885: add optional chain operator so amp is not breaking in WP 6.5
1 parent 39cf265 commit b9f291d

File tree

2 files changed

+27705
-19442
lines changed

2 files changed

+27705
-19442
lines changed

assets/src/block-editor/components/with-media-library-notice.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export default ( InitialMediaUpload, minImageDimensions ) => {
5454
this.initFeaturedImage();
5555
} else {
5656
// Restore the original`onOpen` callback as it will be overridden by the parent class.
57-
this.frame.off( 'open', this.onOpen );
58-
this.frame.on( 'open', super.onOpen.bind( this ) );
57+
this.frame?.off( 'open', this.onOpen );
58+
this.frame?.on( 'open', super.onOpen.bind( this ) );
5959
}
6060
}
6161

0 commit comments

Comments
 (0)