Skip to content

Commit baee450

Browse files
authored
Fix closure warning when building with base64.js and webgl.js (emscripten-core#23843)
Fixes: emscripten-core#23841
1 parent 7cef1a5 commit baee450

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib/libwebgl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var LibraryGL = {
2323
// glInvalidateSubFramebuffer that need to pass a short array to the WebGL
2424
// API, create a set of short fixed-length arrays to avoid having to generate
2525
// any garbage when calling those functions.
26-
$tempFixedLengthArray__postset: 'for (var i = 0; i < 32; ++i) tempFixedLengthArray.push(new Array(i));',
26+
$tempFixedLengthArray__postset: 'for (let i = 0; i < 32; ++i) tempFixedLengthArray.push(new Array(i));',
2727
$tempFixedLengthArray: [],
2828

2929
$miniTempWebGLFloatBuffers: [],

test/test_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9987,6 +9987,7 @@ def test_closure_full_js_library(self, args):
99879987
self.build(test_file('hello_world.c'), emcc_args=[
99889988
'--closure=1',
99899989
'--minify=0',
9990+
'-lbase64.js',
99909991
'-Werror=closure',
99919992
'-sINCLUDE_FULL_LIBRARY',
99929993
'-sOFFSCREEN_FRAMEBUFFER',

0 commit comments

Comments
 (0)