]> _ Git - fluidbook-html5.git/commitdiff
wip #2570 @0:05
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 1 Feb 2019 14:27:34 +0000 (15:27 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 1 Feb 2019 14:27:34 +0000 (15:27 +0100)
js/main.js

index f8104ac3a2b9379f23cb63dafdc0c3b75c8abcd5..58e87d94e3673ce813203143af0562943d8f1e07 100644 (file)
@@ -525,6 +525,9 @@ function getPublicationURL(id) {
 
 $(function () {
     $.fn.isLoaded = function () {
+        if ($(this).length === 0) {
+            return true;
+        }
         var img = $(this).get(0);
         if (img.readyState === 4 || img.readyState === 'complete') {
             return true;