diff options
-rw-r--r-- | imagesloaded.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/imagesloaded.js b/imagesloaded.js index f407da0..e89f745 100644 --- a/imagesloaded.js +++ b/imagesloaded.js @@ -179,6 +179,10 @@ function makeArray( obj ) { ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { var style = getStyle( elem ); + if(!style) { + // Firefox returns null if in a hidden iframe https://bugzilla.mozilla.org/show_bug.cgi?id=548397 + return; + } // get url inside url("...") var reURL = /url\((['"])?(.*?)\1\)/gi; var matches = reURL.exec( style.backgroundImage ); |