Browse Source

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
Rob Wu 11 years ago
parent
commit
bb13fb939e
  1. 1
      web/viewer.js

1
web/viewer.js

@ -128,6 +128,7 @@ var PDFView = { @@ -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() {

Loading…
Cancel
Save