From 08c059e8d04f311b605768246f9da838ad5941c4 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 7 Dec 2013 01:58:23 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index a02cbd8f59..8089128cf8 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -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' ); } }