We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9f01e6b + ef1a1ea commit 955bcb9Copy full SHA for 955bcb9
src/xiaomi-vacuum-map-card.ts
@@ -827,7 +827,7 @@ export class XiaomiVacuumMapCard extends LitElement {
827
828
private _isInEditor(): boolean {
829
function isInEditor(e: Element): boolean {
830
- return e.parentElement?.tagName?.toLowerCase() === "hui-card-preview"
+ return (e.parentElement?.tagName?.toLowerCase() === "hui-card" && "preview" in (e.parentElement?.attributes ?? []))
831
|| e.parentElement != null && isInEditor(e.parentElement)
832
|| e.parentNode?.toString() == "[object ShadowRoot]" && isInEditor((e.getRootNode() as ShadowRoot).host);
833
}
0 commit comments