Remove usage of replaceAll
Some checks failed
Make Latest Folder On EmulatorJS CDN / run (push) Has been cancelled

This commit is contained in:
Ethan O'Brien 2024-07-28 21:40:49 -05:00
parent 605a271299
commit f7fa56757b

View file

@ -596,7 +596,7 @@ class EmulatorJS {
} }
} }
versionAsInt(ver) { versionAsInt(ver) {
return parseInt(ver.replaceAll(".", "")); return parseInt(ver.split(".").join(""));
} }
checkCoreCompatibility(version) { checkCoreCompatibility(version) {
// Leave commented until next release - this is ready to go. // Leave commented until next release - this is ready to go.
@ -3447,7 +3447,7 @@ class EmulatorJS {
const leftHandedMode = false; const leftHandedMode = false;
const blockCSS = 'height:31px;text-align:center;border:1px solid #ccc;border-radius:5px;line-height:31px;'; const blockCSS = 'height:31px;text-align:center;border:1px solid #ccc;border-radius:5px;line-height:31px;';
const controlSchemeCls = `cs_${this.getControlScheme()}`.replaceAll(/\s/g, '_'); const controlSchemeCls = `cs_${this.getControlScheme()}`.split(/\s/g).join('_');
for (let i=0; i<info.length; i++) { for (let i=0; i<info.length; i++) {
if (info[i].type !== 'button') continue; if (info[i].type !== 'button') continue;