diff --git a/package.json b/package.json index 9cad53c..c98a8ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bd/core", - "version": "1.9.1", + "version": "1.9.2", "type": "module", "description": "百搭UI组件库的核心", "main": "dist/index.js", diff --git a/src/index.js b/src/index.js index 5512a71..f5bdd25 100644 --- a/src/index.js +++ b/src/index.js @@ -183,7 +183,7 @@ export class Component extends HTMLElement { disconnectedCallback() { this[__children__]?.setConnected(false) - if (!document.body.contains(this)) { + if (!document.body?.contains(this)) { let $events = this.$events if ($events) { for (let name in $events) {