Skip to content

Commit

Permalink
Patch for undefined exception when running lazy load on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddurand committed Jul 13, 2013
1 parent 2e636a6 commit b110784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.lazyload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
Expand Down

0 comments on commit b110784

Please sign in to comment.