From 6b4012ccc89bf601f88d8f8635be2d239dc5a51e Mon Sep 17 00:00:00 2001 From: Yusuf Sallam <68395788+yusufsallam64@users.noreply.github.com> Date: Sun, 3 Sep 2023 17:14:31 -0400 Subject: [PATCH] Revert to using ifDefined --- src/elements/common/navbar.ts | 143 ++++++++++++++++------------------ 1 file changed, 67 insertions(+), 76 deletions(-) diff --git a/src/elements/common/navbar.ts b/src/elements/common/navbar.ts index 128adc20..baa5b5f8 100644 --- a/src/elements/common/navbar.ts +++ b/src/elements/common/navbar.ts @@ -172,7 +172,7 @@ export default class NavBar extends LitElement { } renderCrumbImage(crumb: CrumbDisplay): TemplateResult { - if(typeof crumb.img === 'undefined') return html``; + if (typeof crumb.img === 'undefined') return html``; switch (crumb.img.type) { case 'Group': @@ -203,28 +203,12 @@ export default class NavBar extends LitElement { clip-rule="evenodd" /> - ${ - when(typeof crumb.url !== 'undefined', () => { - return html` - - ${this.renderCrumbImage(crumb)} - ${crumb.name} - - ` - }, () => { - return html` - - ${this.renderCrumbImage(crumb)} - ${crumb.name} - - ` - }) - } + + ${this.renderCrumbImage(crumb)} ${crumb.name} + ` @@ -234,70 +218,77 @@ export default class NavBar extends LitElement { render() { return html` - `; } }