Fix debug screen regression (#3300)

[ci no changelog needed]

Entry points links were not clickable if an empty entry name was provided, like `http://localhost:8080?entry=`

The reason was the loader div that covered the whole screen.
This commit is contained in:
Ilya Bogdanov 2022-02-25 00:55:41 +03:00 committed by GitHub
parent 0836ce741d
commit abbb3a4679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -949,12 +949,15 @@ async function runEntryPoint(config: Config) {
let fn_name = wasm_entry_point_pfx + entryTarget
let fn = wasm[fn_name]
if (fn) {
// Loader will be removed by IDE after its initialization.
// All other code paths need to call `loader.destroy()`.
fn()
} else {
loader.destroy()
show_debug_screen(wasm, "Unknown entry point '" + entryTarget + "'. ")
}
} else {
loader.destroy()
show_debug_screen(wasm, '')
}
}