From 35511f2776afb4a647c1d8a9addfcd05b7f42ec3 Mon Sep 17 00:00:00 2001 From: Sean Lynch Date: Sun, 20 Oct 2024 00:23:06 -0400 Subject: [PATCH] docs: Fix persistent dialog close example --- .../src/routes/docs/components/Dialog/+page.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/svelte-ux/src/routes/docs/components/Dialog/+page.svelte b/packages/svelte-ux/src/routes/docs/components/Dialog/+page.svelte index 269704cf5..bc547a2d6 100644 --- a/packages/svelte-ux/src/routes/docs/components/Dialog/+page.svelte +++ b/packages/svelte-ux/src/routes/docs/components/Dialog/+page.svelte @@ -205,7 +205,11 @@ persistent let:close on:close={() => { - alert("Persistent Dialog forced close via 'close({ force: true })'.\n\nDialog will close."); + if (open) { + alert( + "Persistent Dialog forced close via 'close({ force: true })'.\n\nDialog will close." + ); + } toggleOff(); }} on:closeAttempt={() => {