浏览代码

fix: optional chaining on insert vnodes

alvarosabu 2 年之前
父节点
当前提交
c2dcf52c5e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/nodeOps.ts

+ 1 - 1
src/core/nodeOps.ts

@@ -78,7 +78,7 @@ export const nodeOps: RendererOptions<TresObject, TresObject> = {
   },
   insert(child, parent) {
     if (
-      (child?.__vnode.type === 'TresGroup' || child?.__vnode.type === 'TresObject3D') &&
+      (child?.__vnode?.type === 'TresGroup' || child?.__vnode?.type === 'TresObject3D') &&
       parent === null &&
       !child?.__vnode?.ctx?.asyncResolved
     ) {