diff --git a/web/pdf_attachment_viewer.js b/web/pdf_attachment_viewer.js index eb4a3034b..8223cbd4a 100644 --- a/web/pdf_attachment_viewer.js +++ b/web/pdf_attachment_viewer.js @@ -35,13 +35,12 @@ class PDFAttachmentViewer { * @param {PDFAttachmentViewerOptions} options */ constructor({ container, eventBus, downloadManager, }) { - this.attachments = null; - this.container = container; this.eventBus = eventBus; this.downloadManager = downloadManager; - this._renderedCapability = createPromiseCapability(); + this.reset(); + this.eventBus.on('fileattachmentannotation', this._appendAttachment.bind(this)); } diff --git a/web/pdf_outline_viewer.js b/web/pdf_outline_viewer.js index 18d21471a..7aee5b626 100644 --- a/web/pdf_outline_viewer.js +++ b/web/pdf_outline_viewer.js @@ -36,12 +36,11 @@ class PDFOutlineViewer { * @param {PDFOutlineViewerOptions} options */ constructor({ container, linkService, eventBus, }) { - this.outline = null; - this.lastToggleIsShow = true; - this.container = container; this.linkService = linkService; this.eventBus = eventBus; + + this.reset(); } reset() {