瀏覽代碼

Fix endless loop of adding .png to image URL.

Keith Maika 3 年之前
父節點
當前提交
be561addfa
共有 1 個文件被更改,包括 1 次插入1 次删除
  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();