소스 검색

test 4xx on text to prevent CSS errors

Gildas 7 년 전
부모
커밋
5fe357a4fa
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/single-file/single-file-browser.js

+ 1 - 1
lib/single-file/single-file-browser.js

@@ -106,7 +106,7 @@ this.SingleFile = this.SingleFile || (() => {
 					return "data:base64,";
 				}
 			} else {
-				if (options.validateTextContentType && contentType && !contentType.startsWith(PREFIX_CONTENT_TYPE_TEXT)) {
+				if (resourceContent.status >= 400 || (options.validateTextContentType && contentType && !contentType.startsWith(PREFIX_CONTENT_TYPE_TEXT))) {
 					return "";
 				}
 				if (!charSet) {