Themes: Ensure the image returns a width before checking that it is less than 300px.
see #26459. Built from https://develop.svn.wordpress.org/trunk@26765 git-svn-id: http://core.svn.wordpress.org/trunk@26653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9472ced40f
commit
51a89c8ae6
|
@ -366,7 +366,7 @@ themes.view.Details = wp.Backbone.View.extend({
|
||||||
image.src = screenshot.attr( 'src' );
|
image.src = screenshot.attr( 'src' );
|
||||||
|
|
||||||
// Width check
|
// Width check
|
||||||
if ( image.width <= 300 ) {
|
if ( image.width && image.width <= 300 ) {
|
||||||
el.addClass( 'small-screenshot' );
|
el.addClass( 'small-screenshot' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue