修复在iframe中运行时, 调用document.open()报错的问题

pull/1/head 1.9.2
yutent 2023-04-26 19:09:46 +08:00
parent 714d9ceb3b
commit 5e1a5d7ebd
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@bd/core",
"version": "1.9.1",
"version": "1.9.2",
"type": "module",
"description": "百搭UI组件库的核心",
"main": "dist/index.js",

View File

@ -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) {