Skip to content

Commit

Permalink
use repeat instead of map
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Dec 21, 2023
1 parent c113d13 commit f81ab74
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { mdiClose, mdiContentPaste, mdiPlus } from "@mdi/js";
import Fuse, { IFuseOptions } from "fuse.js";
import { CSSResultGroup, LitElement, css, html, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { repeat } from "lit/directives/repeat";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../../common/dom/fire_event";
import { domainIcon } from "../../../common/entity/domain_icon";
Expand Down Expand Up @@ -452,7 +453,9 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
</ha-list-item>
<li divider role="separator"></li>`
: ""}
${items.map(
${repeat(
items,
(item) => item.key,
(item) => html`
<ha-list-item
.twoline=${Boolean(item.description)}
Expand Down

0 comments on commit f81ab74

Please sign in to comment.