From f0dab482fd4bcd16e3471f0ca52e3155a5c5484e Mon Sep 17 00:00:00 2001 From: christophe-g Date: Mon, 18 Dec 2023 21:26:00 +0100 Subject: [PATCH] chore(progress): use ternary operator + nothing instead of when --- progress/internal/linear-progress.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/progress/internal/linear-progress.ts b/progress/internal/linear-progress.ts index 63297602e..23bc270fb 100644 --- a/progress/internal/linear-progress.ts +++ b/progress/internal/linear-progress.ts @@ -4,10 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import {html} from 'lit'; +import {html, nothing} from 'lit'; import {property} from 'lit/decorators.js'; import {styleMap} from 'lit/directives/style-map.js'; -import {when} from 'lit/directives/when.js'; import {Progress} from './progress.js'; @@ -37,7 +36,7 @@ export class LinearProgress extends Progress { // only display dots when visible - this prevents invisible infinite animation const showDots = !this.indeterminate && (this.buffer >= this.max || this.value >= this.max) ; return html` - ${when(showDots, () => html`
`)} + ${showDots ? html`
` : nothing}