mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Simplify
This commit is contained in:
parent
f18997c7c3
commit
4fcfcbeefb
@ -130,12 +130,13 @@ class DialogCalendarEventDetail extends LitElement {
|
||||
|
||||
private _renderRruleAsText(value: string) {
|
||||
// TODO: Make sure this handles translations
|
||||
if (!value) {
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
const readableText =
|
||||
value === ""
|
||||
? ""
|
||||
: capitalizeFirstLetter(RRule.fromString(`RRULE:${value}`).toText());
|
||||
return html`<div id="text">${readableText}</div>`;
|
||||
return html`<div id="text">
|
||||
${capitalizeFirstLetter(RRule.fromString(`RRULE:${value}`).toText())}
|
||||
</div>`;
|
||||
} catch (e) {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user