Przeglądaj źródła

set default accept header

Gildas 4 lat temu
rodzic
commit
9fb39d4aaa
2 zmienionych plików z 1 dodań i 1 usunięć
  1. 0 0
      dist/single-file.js
  2. 1 1
      lib/single-file/single-file-util.js

Plik diff jest za duży
+ 0 - 0
dist/single-file.js


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

@@ -199,7 +199,7 @@ function getInstance(utilOptions) {
 			return { data: options.asBinary ? "data:null;base64," : "", resourceURL };
 		}
 		try {
-			const accept = options.acceptHeaders[options.expectedType] || "*/*";
+			const accept = options.acceptHeaders ? options.acceptHeaders[options.expectedType] : "*/*";
 			if (options.frameId) {
 				try {
 					response = await fetchFrameResource(resourceURL, { frameId: options.frameId, referrer: options.resourceReferrer, headers: { accept } });

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików