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={() => {