mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 11:16:42 +01:00
Merge branch 'master' into sound
This commit is contained in:
@@ -326,10 +326,11 @@ export default function MicroW8(screen, config = {}) {
|
||||
async function runModuleFromURL(url, keepUrl) {
|
||||
let response = await fetch(url);
|
||||
let type = response.headers.get('Content-Type');
|
||||
if(type && type.includes('html')) {
|
||||
throw false;
|
||||
if((type && type.includes('html')) || response.status != 200) {
|
||||
return false;
|
||||
}
|
||||
runModule(await response.arrayBuffer(), keepUrl || devkitMode);
|
||||
return true;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user