diff --git a/www/js/app.js b/www/js/app.js index 448462d5..b7856979 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -100,7 +100,9 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'images', 'cookies', 'q', 'trans $(window).resize(function() { resizeIFrame; // We need to load any images exposed by the resize - document.getElementById('articleContent').contentWindow.onscroll(); + var scrollFunc = document.getElementById('articleContent').contentWindow; + scrollFunc = scrollFunc ? scrollFunc.onscroll : null; + if (scrollFunc) scrollFunc(); }); ////Polyfill scrollStopped event