]> git.parisson.com Git - pdf.js.git/commitdiff
Fixing opening from the file system
authornotmasteryet <async.processingjs@yahoo.com>
Mon, 5 Dec 2011 23:48:21 +0000 (17:48 -0600)
committernotmasteryet <async.processingjs@yahoo.com>
Mon, 5 Dec 2011 23:48:21 +0000 (17:48 -0600)
src/core.js

index 284b3cb4021af57e1c5a56e3fbc467e1c9f34c19..bbdf90f60cd2158a3b6322cede7b3623f8371c3a 100644 (file)
@@ -31,7 +31,7 @@ function getPdf(arg, callback) {
   var xhr = new XMLHttpRequest();
   xhr.open('GET', params.url);
   xhr.mozResponseType = xhr.responseType = 'arraybuffer';
-  xhr.expected = (document.URL.indexOf('file:') === 0) ? 0 : 200;
+  xhr.expected = (params.url.indexOf('file:') === 0) ? 0 : 200;
 
   if ('progress' in params)
     xhr.onprogress = params.progress || undefined;