Skip to content

Commit 1989412

Browse files
committed
Prevents error in tooltip when shoelace hasn't upgraded yet
1 parent 2f600ca commit 1989412

File tree

1 file changed

+3
-0
lines changed
  • src/webviews/apps/shared/components/overlays

1 file changed

+3
-0
lines changed

src/webviews/apps/shared/components/overlays/tooltip.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export class GlTooltip extends LitElement {
8282
});
8383

8484
const target: any = this.shadowRoot?.querySelector('sl-tooltip')?.shadowRoot;
85+
// TODO: sometimes sl-tooltip might not be upgraded yet, need to look at watching for the upgrade
86+
if (!target) return;
87+
8588
this.observer.observe(target, {
8689
attributes: true,
8790
attributeFilter: ['data-current-placement'],

0 commit comments

Comments
 (0)