mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Fix detection of method to use to fetch url in downloadFile function
This commit is contained in:
parent
35639bb896
commit
a4e4aef907
@ -109,7 +109,7 @@ class EmulatorJS {
|
||||
}
|
||||
let url;
|
||||
try {url=new URL(path)}catch(e){};
|
||||
if (!url || !['http:', 'https:'].includes(url.protocol)) {
|
||||
if (url && !['http:', 'https:'].includes(url.protocol)) {
|
||||
//Most commonly blob: urls. Not sure what else it could be
|
||||
if (opts.method === 'HEAD') {
|
||||
cb({headers:{}});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user