Skip to content

Commit

Permalink
Fix #217
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Oct 13, 2022
1 parent 0fb56a5 commit 9146e3b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions layout-card.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "layout-card",
"version": "2.4.3",
"version": "2.4.4",
"description": "",
"private": true,
"scripts": {
Expand Down
11 changes: 8 additions & 3 deletions src/patches/hui-view-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ customElements.whenDefined("hui-view-editor").then(() => {
const retval = this._oldSchema(localize);
const typeSelector = retval.find((e) => e.name == "type");
if (typeSelector.name === "layout") return retval;
typeSelector.selector.select.options.push(
...LAYOUT_CARD_SELECTOR_OPTIONS
);
if (
typeSelector.selector.select.options.indexOf(
LAYOUT_CARD_SELECTOR_OPTIONS[0]
) === -1
)
typeSelector.selector.select.options.push(
...LAYOUT_CARD_SELECTOR_OPTIONS
);
if (retval.find((e) => e.name === "layout") === undefined)
retval.push({
name: "layout",
Expand Down

0 comments on commit 9146e3b

Please sign in to comment.