Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 825bb7a

Browse files
Update ASSIMP Viewer
1 parent 06d2cd3 commit 825bb7a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

viewers/templates/ASSIMP Viewer.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3708,6 +3708,11 @@
37083708
function loadFile() {
37093709
let lfile = local_files ? local_files[ selected_gltf_file ] : ( assimp_load === true ? selected_gltf_file : null );
37103710

3711+
if (lfile === null) {
3712+
handle_error( 'No valid file selected!' );
3713+
return;
3714+
}
3715+
37113716
gltf_loader.load( URL.createObjectURL( lfile ), async function( gltf ) {
37123717
URL.revokeObjectURL( assimp_load === true ? selected_gltf_file : lfile );
37133718

@@ -4061,7 +4066,7 @@
40614066
handle_error( error );
40624067
});
40634068
} else {
4064-
gltf_loader.load( selected_gltf_url_file ? selected_gltf_url_file : selected_gltf_file, async function( gltf ) {
4069+
gltf_loader.load( selected_gltf_url_file, async function( gltf ) {
40654070
parser = gltf.parser;
40664071
scenes = gltf.scenes;
40674072
cameras = gltf.cameras;

0 commit comments

Comments
 (0)