Skip to content

Commit

Permalink
fixes #1548
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Sep 14, 2023
1 parent c858bc3 commit 4d32979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/pages/resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti

- Fixed a bug in the autoloader causing it to register non-Shoelace elements [#1563]
- Fixed a bug in `<sl-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

Expand Down
9 changes: 3 additions & 6 deletions src/components/popup/popup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,10 @@ export default class SlPopup extends ShoelaceElement {
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() {
Expand Down

0 comments on commit 4d32979

Please sign in to comment.