Skip to content

Commit

Permalink
stephanrauh/ngx-extended-pdf-viewer#2784 make sure that the eventBus …
Browse files Browse the repository at this point in the history
…attribute is set before using it (fixed a bug that caused some documents to crash in single-page mode)
  • Loading branch information
stephanrauh committed Feb 5, 2025
1 parent 6218538 commit 15ec795
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/pdf_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ class PDFViewer {
this.container = options.container;
this.viewer = options.viewer || options.container.firstElementChild;

/** #2784 modified by ngx-extended-pdf-viewer */
this.eventBus = options.eventBus;
/** #2784 end of modification by ngx-extended-pdf-viewer */
/** #495 modified by ngx-extended-pdf-viewer */
this.pageViewMode = options.pageViewMode || "multiple";
/** end of modification */
Expand All @@ -307,7 +310,6 @@ class PDFViewer {
}
this.#resizeObserver.observe(this.container);

this.eventBus = options.eventBus;
this.linkService = options.linkService || new SimpleLinkService();
this.downloadManager = options.downloadManager || null;
this.findController = options.findController || null;
Expand Down

0 comments on commit 15ec795

Please sign in to comment.