Преглед на файлове

ignore invalid content types

Gildas преди 7 години
родител
ревизия
d0ecefa03f
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      lib/single-file/single-file-browser.js

+ 4 - 0
lib/single-file/single-file-browser.js

@@ -82,6 +82,10 @@ this.SingleFile = this.SingleFile || (() => {
 			if (contentType) {
 				contentType = contentType.match(/^([^;]*)/)[0];
 			}
+			if (contentType.indexOf("/") <= 0) {
+				debugger
+				contentType = null;
+			}
 			if (options && options.asDataURI) {
 				try {
 					const buffer = await resourceContent.arrayBuffer();