Gildas пре 3 година
родитељ
комит
2fdb083c06
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/single-file/single-file-util.js

+ 3 - 0
src/single-file/single-file-util.js

@@ -235,6 +235,9 @@ function getInstance(utilOptions) {
 			charset = options.charset;
 		}
 		if (options.asBinary) {
+			if (response.status >= 400) {
+				return { data: "data:null;base64,", resourceURL };
+			}
 			try {
 				if (DEBUG) {
 					log("  // ENDED   download url =", resourceURL, "delay =", Date.now() - startTime);