1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #7652 from Snuffleupagus/resize-event-handler-prevent-error-before-eventBus-initialized

Prevent errors if the 'resize' event is fired before the `eventBus` has been initialized
This commit is contained in:
Yury Delendik 2016-09-21 08:22:29 -05:00 committed by GitHub
commit 431af8cf85

View file

@ -1803,6 +1803,9 @@ function webViewerUpdateViewarea(e) {
}
window.addEventListener('resize', function webViewerResize(evt) {
if (!PDFViewerApplication.eventBus) {
return;
}
PDFViewerApplication.eventBus.dispatch('resize');
});