Fix endless loop of adding .png to image URL.

This commit is contained in:
Keith Maika 2022-03-29 11:41:06 -04:00 committed by JC Brand
parent c379fe80fb
commit be561addfa

View File

@ -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();