Skip to content

Commit

Permalink
fix: object3d check in reconciler
Browse files Browse the repository at this point in the history
  • Loading branch information
krispya committed Jun 22, 2023
1 parent e8f2ef0 commit 2e7d5d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fiber/src/core/reconciler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function handleContainerEffects(parent: Instance, child: Instance, beforeChild?:
// Append instance
if (child.props.attach) {
attach(parent, child)
} else if (child.object instanceof THREE.Object3D && parent.object instanceof THREE.Object3D) {
} else if (isObject3D(child.object) && isObject3D(parent.object)) {
if (beforeChild) {
child.object.parent = parent.object
parent.object.children.splice(parent.object.children.indexOf(beforeChild.object), replace ? 1 : 0, child.object)
Expand Down

0 comments on commit 2e7d5d6

Please sign in to comment.