From 3014990142ddea1285afaf88760476dd1fa4bd70 Mon Sep 17 00:00:00 2001 From: Ryan Gossiaux Date: Sun, 6 Mar 2022 15:51:39 -0800 Subject: [PATCH] Do not pass `static` down to underlying HTML elements Since it was not explicitly exported it appeared in $$restProps. Harmless, but clutters up the HTML. --- src/lib/utils/Render.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/utils/Render.svelte b/src/lib/utils/Render.svelte index a436a4ed..87111cae 100644 --- a/src/lib/utils/Render.svelte +++ b/src/lib/utils/Render.svelte @@ -46,6 +46,8 @@ export let features: Features = Features.None; // The static and unmount props are only used in conjunction with the render strategies export let unmount = true; + let static_ = false; + export { static_ as static }; let classProp: ((props: TSlotProps) => string) | string | undefined = undefined; @@ -72,11 +74,11 @@ $: show = visible || - (features & Features.Static && $$props.static) || + (features & Features.Static && static_) || !(features & Features.RenderStrategy && unmount); $: hidden = !visible && - !(features & Features.Static && $$props.static) && + !(features & Features.Static && static_) && features & Features.RenderStrategy && !unmount;