Themes: Ensure the image returns a width before checking that it is less than 300px.

see #26459.


git-svn-id: https://develop.svn.wordpress.org/trunk@26765 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-12-07 01:58:23 +00:00
parent 5e55c77f89
commit 08c059e8d0

View File

@ -366,7 +366,7 @@ themes.view.Details = wp.Backbone.View.extend({
image.src = screenshot.attr( 'src' );
// Width check
if ( image.width <= 300 ) {
if ( image.width && image.width <= 300 ) {
el.addClass( 'small-screenshot' );
}
}