Переглянути джерело

PDF.js version 1.2.87 - See mozilla/pdf.js@3c6df26704c23ccac81ec4c616c3b88b8bcbec26

Pdf Bot 9 роки тому
батько
коміт
1e3180dac0
5 змінених файлів з 16 додано та 12 видалено
  1. 1 1
      bower.json
  2. 6 4
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 6 4
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.2.85",
+  "version": "1.2.87",
   "main": [
     "build/pdf.js",
     "build/pdf.worker.js"

+ 6 - 4
build/pdf.combined.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.2.85';
-PDFJS.build = '5b2015b';
+PDFJS.version = '1.2.87';
+PDFJS.build = '3c6df26';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -8427,11 +8427,13 @@ var NetworkManager = (function NetworkManagerClosure() {
         });
       } else if (pendingRequest.onProgressiveData) {
         pendingRequest.onDone(null);
-      } else {
+      } else if (chunk) {
         pendingRequest.onDone({
           begin: 0,
           chunk: chunk
         });
+      } else if (pendingRequest.onError) {
+        pendingRequest.onError(xhr.status);
       }
     },
 
@@ -41160,7 +41162,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
 
         onError: function onError(status) {
           var exception;
-          if (status === 404) {
+          if (status === 404 || status === 0 && /^file:/.test(source.url)) {
             exception = new MissingPDFException('Missing PDF "' +
                                                 source.url + '".');
             handler.send('MissingPDF', exception);

+ 2 - 2
build/pdf.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.2.85';
-PDFJS.build = '5b2015b';
+PDFJS.version = '1.2.87';
+PDFJS.build = '3c6df26';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it

+ 6 - 4
build/pdf.worker.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.2.85';
-PDFJS.build = '5b2015b';
+PDFJS.version = '1.2.87';
+PDFJS.build = '3c6df26';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -1847,11 +1847,13 @@ var NetworkManager = (function NetworkManagerClosure() {
         });
       } else if (pendingRequest.onProgressiveData) {
         pendingRequest.onDone(null);
-      } else {
+      } else if (chunk) {
         pendingRequest.onDone({
           begin: 0,
           chunk: chunk
         });
+      } else if (pendingRequest.onError) {
+        pendingRequest.onError(xhr.status);
       }
     },
 
@@ -34580,7 +34582,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
 
         onError: function onError(status) {
           var exception;
-          if (status === 404) {
+          if (status === 404 || status === 0 && /^file:/.test(source.url)) {
             exception = new MissingPDFException('Missing PDF "' +
                                                 source.url + '".');
             handler.send('MissingPDF', exception);

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.2.85",
+  "version": "1.2.87",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [
     "Mozilla",