Catch undefined EJS_Runtime as a start error

This commit is contained in:
Ethan O'Brien 2024-12-09 22:54:17 -06:00 committed by GitHub
parent 3a3eee7d85
commit a8d0284e06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -989,6 +989,11 @@ class EmulatorJS {
})();
}
initModule(wasmData, threadData) {
if (typeof window.EJS_Runtime !== "function") {
console.warn("EJS_Runtime is not defined!");
this.startGameError(this.localization("Failed to start game"));
return;
}
window.EJS_Runtime({
noInitialRun: true,
onRuntimeInitialized: null,