Skip to content

Commit f682d5b

Browse files
authored
accepts onerror callback when parse (#28382)
1 parent c5a6289 commit f682d5b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/jsm/loaders/LDrawLoader.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,7 @@ class LDrawLoader extends Loader {
19741974

19751975
}
19761976

1977-
parse( text, onLoad ) {
1977+
parse( text, onLoad, onError ) {
19781978

19791979
this.partsCache
19801980
.parseModel( text, this.materialLibrary )
@@ -1985,7 +1985,8 @@ class LDrawLoader extends Loader {
19851985
group.userData.fileName = '';
19861986
onLoad( group );
19871987

1988-
} );
1988+
} )
1989+
.catch( onError );
19891990

19901991
}
19911992

0 commit comments

Comments
 (0)