File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,7 @@ export default class View extends Component {
511511 const representationIds = [ ] ;
512512 this . selections . forEach ( ( v ) => {
513513 const { prop } = v . getProperties ( ) ;
514- const { representationId } = prop . get ( 'representationId' ) ;
514+ const representationId = prop ? .get ( 'representationId' ) . representationId ;
515515 if ( representationId ) {
516516 representationIds . push ( representationId ) ;
517517 }
@@ -529,6 +529,9 @@ export default class View extends Component {
529529 return this . selections . map ( ( v ) => {
530530 const { prop, compositeID, displayPosition } = v . getProperties ( ) ;
531531
532+ // Return false to mark this item for removal
533+ if ( prop == null ) return false ;
534+
532535 return {
533536 worldPosition : Array . from (
534537 this . openglRenderWindow . displayToWorld (
@@ -543,7 +546,7 @@ export default class View extends Component {
543546 ...prop . get ( 'representationId' ) ,
544547 ray,
545548 } ;
546- } ) ;
549+ } ) . filter ( Boolean ) ;
547550 }
548551 return [ ] ;
549552 }
You can’t perform that action at this time.
0 commit comments