lythreeframe 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -628,11 +628,14 @@ class SceneComponent extends Component {
628
628
  }
629
629
  }
630
630
  destroyChildren() {
631
+ var _a;
631
632
  if (!this.threeObject) {
632
633
  return;
633
634
  }
634
635
  for (let i = 0; i < this.threeObject.children.length; ++i) {
635
- this.threeObject.children[i].userData.LYObject.destroy();
636
+ let obj = (_a = this.threeObject.children[i].userData) === null || _a === void 0 ? void 0 : _a.LYObject;
637
+ if (obj)
638
+ this.threeObject.children[i].userData.LYObject.destroy();
636
639
  }
637
640
  }
638
641
  /* horver */
@@ -626,11 +626,14 @@ class SceneComponent extends Component {
626
626
  }
627
627
  }
628
628
  destroyChildren() {
629
+ var _a;
629
630
  if (!this.threeObject) {
630
631
  return;
631
632
  }
632
633
  for (let i = 0; i < this.threeObject.children.length; ++i) {
633
- this.threeObject.children[i].userData.LYObject.destroy();
634
+ let obj = (_a = this.threeObject.children[i].userData) === null || _a === void 0 ? void 0 : _a.LYObject;
635
+ if (obj)
636
+ this.threeObject.children[i].userData.LYObject.destroy();
634
637
  }
635
638
  }
636
639
  /* horver */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lythreeframe",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Three.js 封装",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",