Skip to content

Commit

Permalink
fix NotFoundError when removing backdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
blidblid committed Nov 4, 2024
1 parent 0895ce9 commit ffec0f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/core/src/lib/components/panel/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ export class BergPanelElement extends WebComponent<BergPanelInputs> {
} else {
this.timeouts.push(
setTimeout(() => {
this.layout.shadowRoot?.removeChild(backdrop);
if (this.layout.shadowRoot?.contains(backdrop)) {
this.layout.shadowRoot.removeChild(backdrop);
}
}, BERG_PANEL_BACKDROP_ANIMATION_DURATION)
);
}
Expand Down

0 comments on commit ffec0f5

Please sign in to comment.