web: fix tabs detecting all slot elements

This commit is contained in:
Jens Langhammer 2021-01-16 23:04:08 +01:00
parent b81f3e4a38
commit 6495d6c50a
2 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ export class Tabs extends LitElement {
} }
render(): TemplateResult { render(): TemplateResult {
const pages = Array.from(this.querySelectorAll("[slot]")); const pages = Array.from(this.querySelectorAll("[slot^='page-']"));
if (!this.currentPage) { if (!this.currentPage) {
if (pages.length < 1) { if (pages.length < 1) {
return html`<h1>${gettext("no tabs defined")}</h1>`; return html`<h1>${gettext("no tabs defined")}</h1>`;