Add another check on response data

This commit is contained in:
Ethan O'Brien 2024-12-15 08:57:59 -06:00 committed by GitHub
parent b4a06cef6c
commit e13522eacf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -560,7 +560,7 @@ class EmulatorJS {
}
const report = "cores/reports/" + this.getCore() + ".json";
this.downloadFile(report, (rep) => {
if (rep === -1 || typeof rep === "string") {
if (rep === -1 || typeof rep === "string" || typeof rep.data === "string") {
rep = {};
} else {
rep = rep.data;