1
0
Эх сурвалжийг харах

ignore invalid content types

Gildas 7 жил өмнө
parent
commit
d0ecefa03f

+ 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();