diff --git a/app/src/block/Panel.ts b/app/src/block/Panel.ts index b933c7be3..44fdf3674 100644 --- a/app/src/block/Panel.ts +++ b/app/src/block/Panel.ts @@ -254,7 +254,7 @@ export class BlockPanel { showMessage(response.msg); return; } - if (this.targetElement) { + if (!this.targetElement) { return; } const action = []; @@ -313,7 +313,7 @@ export class BlockPanel { } private render() { - if (!this.element.parentElement.parentElement) { + if (!document.body.contains(this.element)) { this.destroy(); return; }