From: Justin D'Arcangelo Date: Sun, 26 Jun 2011 06:23:18 +0000 (-0400) Subject: Minor fix for issues with thumbnails when a new PDF was opened from the local filesystem. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d307a90ed4fd9b8e80221cad96952a71ec524deb;p=pdf.js.git Minor fix for issues with thumbnails when a new PDF was opened from the local filesystem. --- diff --git a/multi_page_viewer.js b/multi_page_viewer.js index 4f2bd51..5a94f12 100644 --- a/multi_page_viewer.js +++ b/multi_page_viewer.js @@ -282,6 +282,10 @@ var PDFViewer = { PDFViewer.element.removeChild(PDFViewer.element.firstChild); } + while (PDFViewer.sidebarContentView.hasChildNodes()) { + PDFViewer.sidebarContentView.removeChild(PDFViewer.sidebarContentView.firstChild); + } + PDFViewer.pdf = new PDFDoc(new Stream(data)); PDFViewer.numberOfPages = PDFViewer.pdf.numPages; document.getElementById('numPages').innerHTML = PDFViewer.numberOfPages.toString();