[Pkg-javascript-commits] [pdf.js] 12/141: Only update the Document Properties if the dialog is still visible when the dataAvailablePromise is resolved

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 22:40:25 UTC 2014


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

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

commit edfc78dfe7594ae5fbee90509f1bb74b4a3dcdee
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Wed Apr 2 11:55:35 2014 +0200

    Only update the Document Properties if the dialog is still visible when the dataAvailablePromise is resolved
---
 web/document_properties.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/web/document_properties.js b/web/document_properties.js
index 0010f10..25fbc8e 100644
--- a/web/document_properties.js
+++ b/web/document_properties.js
@@ -74,6 +74,11 @@ var DocumentProperties = {
   },
 
   getProperties: function documentPropertiesGetProperties() {
+    if (!this.visible) {
+      // If the dialog was closed before dataAvailablePromise was resolved,
+      // don't bother updating the properties.
+      return;
+    }
     // Get the file name.
     this.fileName = getPDFFileNameFromURL(PDFView.url);
 

-- 
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