SearchMixin: Avoid error if tag can't be found when we go to scroll to it

This commit is contained in:
nathan 2022-06-16 08:03:59 -06:00
parent 26492c4260
commit 6b950900ee

View File

@ -486,7 +486,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
{ {
this.updateComplete.then(() => this.updateComplete.then(() =>
{ {
this.shadowRoot.querySelector("et2-tag[value='" + event.detail.item.value + "']").scrollIntoView(); this.shadowRoot.querySelector("et2-tag[value='" + event.detail.item.value + "']")?.scrollIntoView();
}); });
} }
} }