when problem

This commit is contained in:
2026-05-14 16:57:56 +02:00
parent 00ad6d7f9f
commit dc9af3181f
4 changed files with 7 additions and 15 deletions

View File

@@ -204,7 +204,7 @@ export const render = rFn => {
return { _rt: 1, _cnt: cnt, destroy: () => { clr(c); clnNd(cnt); cnt.remove(); } };
};
const when = (c, Y, N = null) => {
export const when = (c, Y, N = null) => {
let anc = txt(""), rt = h("div", { style: "display:contents" }, [anc]), v;
watch(() => !!val(c), s => {
if (v) { v.destroy(); v = null; }