Skip to content

Commit e3c4213

Browse files
authored
Use JS arrow functions in a few more places. NFC (#21975)
1 parent 4d22ffe commit e3c4213

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1642
1+
1639
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3542
1+
3492

tools/js_manipulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def add_files_pre_js(pre_js_list, files_pre_js):
4949
''')
5050
utils.write_file(post, '''
5151
if (!Module['preRun']) throw 'Module.preRun should exist because file support used it; did a pre-js delete it?';
52-
necessaryPreJSTasks.forEach(function(task) {
52+
necessaryPreJSTasks.forEach((task) => {
5353
if (Module['preRun'].indexOf(task) < 0) throw 'All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?';
5454
});
5555
''')
@@ -182,7 +182,7 @@ def make_wasm64_wrapper(sig):
182182
# are certain places we need to avoid strict mode still.
183183
# e.g. emscripten_get_callstack (getCallstack) which uses the `arguments`
184184
# global.
185-
return f' var makeWrapper_{sig} = (f) => function ({args_in}) {{ return {result} }};\n'
185+
return f' var makeWrapper_{sig} = (f) => ({args_in}) => {result};\n'
186186

187187

188188
def make_unsign_pointer_wrapper(sig):

0 commit comments

Comments
 (0)