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 @@ -493,7 +493,7 @@ export default class View extends Component {
493493 const representationIds = [ ] ;
494494 this . selections . forEach ( ( v ) => {
495495 const { prop } = v . getProperties ( ) ;
496- const { representationId } = prop . get ( 'representationId' ) ;
496+ const representationId = prop ? .get ( 'representationId' ) . representationId ;
497497 if ( representationId ) {
498498 representationIds . push ( representationId ) ;
499499 }
@@ -511,6 +511,9 @@ export default class View extends Component {
511511 return this . selections . map ( ( v ) => {
512512 const { prop, compositeID, displayPosition } = v . getProperties ( ) ;
513513
514+ // Return false to mark this item for removal
515+ if ( prop == null ) return false ;
516+
514517 return {
515518 worldPosition : Array . from (
516519 this . openglRenderWindow . displayToWorld (
@@ -525,7 +528,7 @@ export default class View extends Component {
525528 ...prop . get ( 'representationId' ) ,
526529 ray,
527530 } ;
528- } ) ;
531+ } ) . filter ( Boolean ) ;
529532 }
530533 return [ ] ;
531534 }
You can’t perform that action at this time.
0 commit comments