From edfc78dfe7594ae5fbee90509f1bb74b4a3dcdee Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 2 Apr 2014 11:55:35 +0200 Subject: [PATCH] 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 0010f10c9..25fbc8e61 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);