From b1107842f552c8d2333a6dda8181f4d96ac074f6 Mon Sep 17 00:00:00 2001 From: "David G. Durand" Date: Sat, 13 Jul 2013 10:41:29 -0400 Subject: [PATCH] Patch for undefined exception when running lazy load on iOS --- jquery.lazyload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.lazyload.js b/jquery.lazyload.js index 1e0f3f67..14943dcf 100644 --- a/jquery.lazyload.js +++ b/jquery.lazyload.js @@ -136,7 +136,7 @@ /* Non optimal workaround. */ if ((/iphone|ipod|ipad.*os 5/gi).test(navigator.appVersion)) { $window.bind("pageshow", function(event) { - if (event.originalEvent.persisted) { + if (event.originalEvent && event.originalEvent.persisted) { elements.each(function() { $(this).trigger("appear"); });