Skip to content

Commit

Permalink
Fix possible access to null this.arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Feb 12, 2025
1 parent 98fae8c commit 4d456b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/map3d/Compare3D.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class Compare3D extends React.Component {
}
componentWillUnmount() {
this.clearClippingPlane();
this.arrows.traverse(obj => obj.dispose?.());
if (this.arrows) {
this.arrows.traverse(obj => obj.dispose?.());
}
}
componentDidUpdate(prevProps, prevState) {
if (this.state.enabled && this.props.active && !prevProps.active) {
Expand Down

0 comments on commit 4d456b7

Please sign in to comment.