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
This commit is contained in:
Rob Wu 2014-07-24 23:37:31 +02:00
parent 2642583e82
commit bb13fb939e

View File

@ -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() {