[Pkg-javascript-commits] [pdf.js] 70/106: Ensure that PDFHistory does not incorrectly replace the initial document hash (issue 6079)

David Prévot taffit at moszumanska.debian.org
Sat Jun 20 21:34:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 27713f9454e3fe138f8d0a6e49e32dcbe21ffa7c
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Thu Jun 4 13:58:45 2015 +0200

    Ensure that PDFHistory does not incorrectly replace the initial document hash (issue 6079)
    
    This is fallout from PR 5971; fixes 6079.
---
 web/viewer.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/web/viewer.js b/web/viewer.js
index ae8a334..a3db3b4 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -799,8 +799,12 @@ var PDFViewerApplication = {
           window.history.replaceState(null, '');
         }
         self.pdfHistory.initialize(self.documentFingerprint);
-        self.initialDestination = self.pdfHistory.initialDestination;
-        self.initialBookmark = self.pdfHistory.initialBookmark;
+
+        if (self.pdfHistory.initialDestination) {
+          self.initialDestination = self.pdfHistory.initialDestination;
+        } else if (self.pdfHistory.initialBookmark) {
+          self.initialBookmark = self.pdfHistory.initialBookmark;
+        }
       }
 
       store.initializedPromise.then(function resolved() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list