backport fix for 1548

This commit is contained in:
Cory LaViska
2023-09-14 12:08:33 -04:00
parent 1179e48955
commit a7c786987d
2 changed files with 4 additions and 6 deletions

View File

@@ -23,6 +23,7 @@ New versions of Web Awesome are released as-needed and generally occur when a cr
- Fixed a bug in the autoloader causing it to register non-Shoelace elements [#1563]
- Fixed a bug in `<wa-switch>` that resulted in improper spacing between the label and the required asterisk [#1540]
- Removed error when a missing popup anchor is provided [#1548]
- Updated `@ctrl/tinycolor` to 4.0.1 [#1542]
- Updated Bootstrap Icons to 1.11.0

View File

@@ -247,13 +247,10 @@ export default class WaPopup extends WebAwesomeElement {
this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;
}
if (!this.anchorEl) {
throw new Error(
'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'
);
// If the anchor is valid, start it up
if (this.anchorEl) {
this.start();
}
this.start();
}
private start() {