Skip to content

Commit 049b8ed

Browse files
Fix editor detection for sections view
1 parent c1ca5c0 commit 049b8ed

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xiaomi-vacuum-map-card",
3-
"version": "v2.2.3",
3+
"version": "v2.2.4",
44
"description": "Xiaomi Vacuum Map Card",
55
"keywords": [
66
"home-assistant",

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-section" && "preview" in (e.parentElement?.attributes ?? []))
831832
|| e.parentElement?.tagName?.toLowerCase() === "hui-card-preview"
832833
|| e.parentElement != null && isInEditor(e.parentElement)
833834
|| e.parentNode?.toString() == "[object ShadowRoot]" && isInEditor((e.getRootNode() as ShadowRoot).host);

0 commit comments

Comments
 (0)