Skip to content

Commit

Permalink
restore file custom actions in autofill with missing cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Nov 8, 2024
1 parent a013a87 commit ed4ba35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/universal-remote-card.min.js

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions src/universal-remote-card-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2512,7 +2512,10 @@ export class UniversalRemoteCardEditor extends LitElement {
if (parentName && childName) {
const parentActions =
structuredClone(
this.DEFAULT_ACTIONS.filter(
[
...(this.customActionsFromFile ?? []),
...this.DEFAULT_ACTIONS,
].filter(
(defaultActions) =>
defaultActions.name == parentName,
)[0],
Expand All @@ -2526,10 +2529,12 @@ export class UniversalRemoteCardEditor extends LitElement {
} else {
const actions =
structuredClone(
this.DEFAULT_ACTIONS.filter(
[
...(this.customActionsFromFile ?? []),
...this.DEFAULT_ACTIONS,
].filter(
(defaultActions) =>
defaultActions.name ==
this.renderTemplate(entry.name, context),
defaultActions.name == parentName,
)[0],
) ?? {};
entry = {
Expand Down

0 comments on commit ed4ba35

Please sign in to comment.