From 64ada61d310d0c9888c797cfda28bc2b637d31e0 Mon Sep 17 00:00:00 2001 From: Ignatius Bagus Date: Thu, 19 Oct 2023 12:02:19 +0700 Subject: [PATCH] fix: recursively checks for invisible nodes (#165) --- src/lib/nodes/Element.svelte | 22 +++++++++++----------- src/lib/nodes/Node.svelte | 8 ++++++-- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/lib/nodes/Element.svelte b/src/lib/nodes/Element.svelte index e1f1235..3c4c03e 100644 --- a/src/lib/nodes/Element.svelte +++ b/src/lib/nodes/Element.svelte @@ -6,7 +6,7 @@ import type { ComponentProps } from 'svelte'; export let tagName: string; - export let hasChildren: boolean; + export let empty: boolean; export let expanded: boolean; export let attributes: ComponentProps['attributes']; @@ -48,7 +48,16 @@ }); -{#if hasChildren} +{#if empty} +
+ < + + + + +  /> +
+{:else} {/if} -{:else} -
- < - - - - -  /> -
{/if}