From bb13fb939ee89fecc53d7ab1714ef0f465075238 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Thu, 24 Jul 2014 23:37:31 +0200 Subject: [PATCH] Initialize PDFView.url = '' The absence of this property caused the following error in PDFView.download: Cannot read property 'split' of undefined This property was unset when the PDF was loaded through a typed array instead of a URL. With the fix, the file name will default to "document.pdf", as defined by getPDFFileNameFromURL in web/ui_utils.js --- web/viewer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/web/viewer.js b/web/viewer.js index 7250fa722..1be81e02c 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -128,6 +128,7 @@ var PDFView = { isViewerEmbedded: (window.parent !== window), idleTimeout: null, currentPosition: null, + url: '', // called once when the document is loaded initialize: function pdfViewInitialize() {