remove error

This commit is contained in:
Cory LaViska
2022-08-09 16:00:43 -04:00
parent 2093568981
commit 9ebb5c8ec7

View File

@@ -242,12 +242,8 @@ export default class SlPopup extends LitElement {
/** Recalculate and repositions the popup. */
reposition() {
if (!this.anchor) {
throw new Error('Invalid anchor element: no child with slot="anchor" was found.');
}
// Nothing to do if the popup is inactive
if (!this.active) {
// Nothing to do if the popup is inactive or the anchor doesn't exist
if (!this.active || !this.anchor) {
return;
}