Explorar o código

ignore invalid content types

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
d0ecefa03f
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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();