Fix build issues

This commit is contained in:
William Brawner 2022-08-17 02:20:38 +00:00
parent 5260d19e94
commit b1c2c4fbdb
2 changed files with 14 additions and 12 deletions

View file

@ -128,15 +128,16 @@ export class TimerFormDialog extends LitElement {
}
private deleteButton() {
if (this.timer?.id) {
return html`
<fluent-button
appearance="outline"
tabindex="0"
@click=${this.delete}
style="margin-top: 1em;">Delete</fluent-button>
`;
if (!this.timer?.id) {
return null;
}
return html`
<fluent-button
appearance="outline"
tabindex="0"
@click=${this.delete}
style="margin-top: 1em;">Delete</fluent-button>
`;
}
private durationString(duration: number | undefined) {

View file

@ -52,11 +52,12 @@ export class AppHome extends LitElement {
}
private editButton() {
if (this.selectedTimer) {
return html`
<fluent-button appearance="stealth" slot="actions" @click=${() => this.editTimer = this.selectedTimer}>Edit</fluent-button>
`;
if (!this.selectedTimer) {
return null;
}
return html`
<fluent-button appearance="stealth" slot="actions" @click=${() => this.editTimer = this.selectedTimer}>Edit</fluent-button>
`;
}
render() {