diff --git a/js/jquery-picture.js b/js/jquery-picture.js index 9fbf510..b62c395 100644 --- a/js/jquery-picture.js +++ b/js/jquery-picture.js @@ -228,14 +228,14 @@ $.each(mediaObj, function(media, path){ var num; + if (0 == media.indexOf('media')) { + num = media.replace(/[^\d.]/g, ''); - num = media.replace(/[^\d.]/g, ''); - - if(!num) - num = 0; - - sizes[num] = path; + if(!num) + num = 0; + sizes[num] = path; + } }); if(element.find('img').length == 0){ @@ -276,4 +276,4 @@ }; -})(jQuery); \ No newline at end of file +})(jQuery);