Skip to content

Commit c1ca5c0

Browse files
Restore compatibility with older HA versions
1 parent 0701a24 commit c1ca5c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/xiaomi-vacuum-map-card.ts

+1
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,7 @@ export class XiaomiVacuumMapCard extends LitElement {
828828
private _isInEditor(): boolean {
829829
function isInEditor(e: Element): boolean {
830830
return (e.parentElement?.tagName?.toLowerCase() === "hui-card" && "preview" in (e.parentElement?.attributes ?? []))
831+
|| e.parentElement?.tagName?.toLowerCase() === "hui-card-preview"
831832
|| e.parentElement != null && isInEditor(e.parentElement)
832833
|| e.parentNode?.toString() == "[object ShadowRoot]" && isInEditor((e.getRootNode() as ShadowRoot).host);
833834
}

0 commit comments

Comments
 (0)