Prevent exception on resize

Former-commit-id: dc16e593b40cc01078616638d5c21b99894cd03e [formerly 05832a9874b0154183f7ac9919f3eb3ea23a6b43]
Former-commit-id: 561a3194705ff28afc571d8fdf7fed4e4310a0f5
This commit is contained in:
Jaifroid 2019-06-15 16:18:37 +01:00
parent 0e0cb97103
commit 47d05fcac1

View File

@ -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