Skip to content

Commit f1fe307

Browse files
authored
Avoid ES6 syntax in places that are not Babeled. #25415 (#25451)
1 parent 09f61fa commit f1fe307

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/proxyClient.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if (ENVIRONMENT_IS_NODE) {
2929
#else
3030
// For class modules we decode the data URL and use `eval: true`.
3131
url = Buffer.from(url.split(",")[1], 'base64').toString();
32-
options ||= {}
32+
if (!options) options = {};
3333
options.eval = true;
3434
#endif
3535
}
@@ -132,8 +132,7 @@ var frameId = 0;
132132

133133
// Worker
134134

135-
var filename;
136-
filename ||= '<<< filename >>>';
135+
var filename = '<<< filename >>>';
137136

138137
var worker = new Worker(filename);
139138

src/shell.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
},
6262
canvas: canvasElement,
6363
setStatus(text) {
64-
Module.setStatus.last ??= { time: Date.now(), text: '' };
64+
if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
6565
if (text === Module.setStatus.last.text) return;
6666
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
6767
var now = Date.now();

src/shell_minimal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
},
101101
canvas: canvasElement,
102102
setStatus(text) {
103-
Module.setStatus.last ??= { time: Date.now(), text: '' };
103+
if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
104104
if (text === Module.setStatus.last.text) return;
105105
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
106106
var now = Date.now();

0 commit comments

Comments
 (0)