Explorar o código

Fix endless loop of adding .png to image URL.

Keith Maika %!s(int64=3) %!d(string=hai) anos
pai
achega
be561addfa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/headless/utils/url.js

+ 1 - 1
src/headless/utils/url.js

@@ -21,7 +21,7 @@ export function getURI (url) {
 
 function checkFileTypes (types, url) {
     const uri = getURI(url);
-    if (uri === null || (window.location.protocol !== 'chrome-extension:' && !checkTLS(uri))) {
+    if (uri === null || (!['chrome-extension:','file:'].includes(window.location.protocol) && !checkTLS(uri))) {
         return false;
     }
     const filename = uri.filename().toLowerCase();