Skip to content

Commit 9241eca

Browse files
committed
fix indentation
1 parent e0bc809 commit 9241eca

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
@@ -755,6 +755,13 @@ def generate_js(data_target, data_files, metadata):
755755
if options.has_embedded and not options.obj_output:
756756
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')
757757

758+
catch_handler = ''
759+
if options.export_es6:
760+
catch_handler += '''
761+
.catch((error) => {
762+
loadDataReject(error);
763+
})'''
764+
758765
for counter, file_ in enumerate(data_files):
759766
filename = file_.dstpath
760767
dirname = os.path.dirname(filename)
@@ -1054,13 +1061,6 @@ def generate_js(data_target, data_files, metadata):
10541061
code += '''
10551062
Module['preloadResults'] ??= {};\n'''
10561063

1057-
catch_handler = ''
1058-
if options.export_es6:
1059-
catch_handler += '''
1060-
.catch((error) => {
1061-
loadDataReject(error);
1062-
})'''
1063-
10641064
if options.use_preload_cache:
10651065
code += '''
10661066
async function preloadFallback(error) {

0 commit comments

Comments
 (0)