Skip to content

Commit 295b750

Browse files
committed
Style.
1 parent e360fa8 commit 295b750

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

tools/file_packager.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,17 +1001,14 @@ def generate_js(data_target, data_files, metadata):
10011001
10021002
if (totalSize) {
10031003
if (Module['setStatus']) Module['setStatus'](`Downloading data... (${totalLoaded}/${totalSize})`);
1004-
}
1005-
else {
1004+
} else {
10061005
if (Module['setStatus']) Module['setStatus']('Downloading data...');
10071006
}
10081007
return iterate();
1009-
}
1010-
else {
1011-
const size = chunks.map((c) => c.length).reduce((a, b) => a + b, 0);
1008+
} else {
10121009
let index = 0;
1013-
const packageData = new Uint8Array(size);
1014-
for(const chunk of chunks) {
1010+
const packageData = new Uint8Array(chunks.map((c) => c.length).reduce((a, b) => a + b, 0));
1011+
for (const chunk of chunks) {
10151012
packageData.set(chunk, index);
10161013
index += chunk.length;
10171014
}

0 commit comments

Comments
 (0)