mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Media: Fix JS TypeError with video playlists and native video.
Verify that the `resized` property exists on a video in the playlist before attempting to read it. Prevent a TypeError from being thrown and breaking the playlist if a video type requires native video support. Props afercia, here. Fixes #47513. git-svn-id: https://develop.svn.wordpress.org/trunk@54279 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2653c8e510
commit
235befac17
@ -85,8 +85,10 @@
|
||||
if ( this.data.images && this.current.get( 'image' ) && -1 === this.current.get( 'image' ).src.indexOf( defaultImage ) ) {
|
||||
this.playerNode.attr( 'poster', this.current.get( 'image' ).src );
|
||||
}
|
||||
dimensions = this.current.get( 'dimensions' ).resized;
|
||||
this.playerNode.attr( dimensions );
|
||||
dimensions = this.current.get( 'dimensions' );
|
||||
if ( dimensions && dimensions.resized ) {
|
||||
this.playerNode.attr( dimensions.resized );
|
||||
}
|
||||
} else {
|
||||
if ( ! this.data.images ) {
|
||||
this.current.set( 'image', false );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user