Skip to content

Commit 2874708

Browse files
committed
fix indentation
1 parent 03095d0 commit 2874708

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tools/file_packager.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,13 @@ def generate_js(data_target, data_files, metadata):
758758
if options.has_embedded and not options.obj_output:
759759
diagnostics.warn('--obj-output is recommended when using --embed. This outputs an object file for linking directly into your application is more efficient than JS encoding')
760760

761+
catch_handler = ''
762+
if options.export_es6:
763+
catch_handler += '''
764+
.catch((error) => {
765+
loadDataReject(error);
766+
})'''
767+
761768
for counter, file_ in enumerate(data_files):
762769
filename = file_.dstpath
763770
dirname = os.path.dirname(filename)
@@ -1057,13 +1064,6 @@ def generate_js(data_target, data_files, metadata):
10571064
code += '''
10581065
Module['preloadResults'] ??= {};\n'''
10591066

1060-
catch_handler = ''
1061-
if options.export_es6:
1062-
catch_handler += '''
1063-
.catch((error) => {
1064-
loadDataReject(error);
1065-
})'''
1066-
10671067
if options.use_preload_cache:
10681068
code += '''
10691069
async function preloadFallback(error) {

0 commit comments

Comments
 (0)