File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -2750,11 +2750,15 @@ class AnimationParser {
27502750
27512751 if ( layerCurveNodes [ i ] === undefined ) {
27522752
2753- const modelID = connections . get ( child . ID ) . parents . filter ( function ( parent ) {
2753+ const filteredParents = connections . get ( child . ID ) . parents . filter ( function ( parent ) {
27542754
27552755 return parent . relationship !== undefined ;
27562756
2757- } ) [ 0 ] . ID ;
2757+ } ) ;
2758+
2759+ if ( filteredParents . length === 0 ) return ;
2760+
2761+ const modelID = filteredParents [ 0 ] . ID ;
27582762
27592763 if ( modelID !== undefined ) {
27602764
@@ -2814,11 +2818,15 @@ class AnimationParser {
28142818
28152819 if ( layerCurveNodes [ i ] === undefined ) {
28162820
2817- const deformerID = connections . get ( child . ID ) . parents . filter ( function ( parent ) {
2821+ const filteredParents = connections . get ( child . ID ) . parents . filter ( function ( parent ) {
28182822
28192823 return parent . relationship !== undefined ;
28202824
2821- } ) [ 0 ] . ID ;
2825+ } ) ;
2826+
2827+ if ( filteredParents . length === 0 ) return ;
2828+
2829+ const deformerID = filteredParents [ 0 ] . ID ;
28222830
28232831 const morpherID = connections . get ( deformerID ) . parents [ 0 ] . ID ;
28242832 const geoID = connections . get ( morpherID ) . parents [ 0 ] . ID ;
You can’t perform that action at this time.
0 commit comments