@@ -33,6 +33,8 @@ export const vDistanceTo = {
},
unmounted: (el: TresObject) => {
arrowHelper?.dispose()
- el.parent.remove(arrowHelper)
+ if (el.parent) {
+ el.parent.remove(arrowHelper)
+ }
}
@@ -56,6 +56,8 @@ export const vLightHelper = {
if (currentInstance && currentInstance.dispose) {
currentInstance.dispose()
- el.parent.remove(currentInstance)
+ el.parent.remove(currentInstance)