Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: additional checks for card editor entities array #277

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Update hui-card-element-editor.ts
  • Loading branch information
flixlix committed Apr 15, 2023
commit daae97f43f4d415ac976ee7c7b4d3185c901ce0a
2 changes: 1 addition & 1 deletion src/patch/hui-card-element-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ customElements.whenDefined("hui-dialog-edit-card").then(() => {
button.appendChild(this._cardModIcon);
if (
this._cardConfig?.card_mod ||
(Array.isArray(this._cardConfig.entities) && this._cardConfig?.entities?.some((e: any) => e.card_mod))
(Array.isArray(this._cardConfig.entities) ?? this._cardConfig?.entities?.some((e: any) => e.card_mod))
) {
this._cardModIcon.style.visibility = "visible";
} else {
Expand Down