Skip to content

Commit

Permalink
Merge branch 'main' into chore/remove-v-rotate-directive-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu authored Feb 6, 2025
2 parents 77649d8 + f512b1a commit 6b4dfac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/directives/vDistanceTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export const vDistanceTo = {
},
unmounted: (el: TresObject) => {
arrowHelper?.dispose()
el.parent.remove(arrowHelper)
if (el.parent) {
el.parent.remove(arrowHelper)
}
},
}
4 changes: 3 additions & 1 deletion src/directives/vLightHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export const vLightHelper = {
if (currentInstance && currentInstance.dispose) {
currentInstance.dispose()
}
el.parent.remove(currentInstance)
if (el.parent) {
el.parent.remove(currentInstance)
}
},
}

0 comments on commit 6b4dfac

Please sign in to comment.