From 8cc827d3552b6dba26a549101b3ca4cb73a83bfe Mon Sep 17 00:00:00 2001 From: Jacob Lamont Date: Mon, 9 Dec 2024 14:10:41 -0500 Subject: [PATCH] [AlertCenter]: fixes 'undefined' title when no title provided --- src/components/alert/alert.stories.svelte | 2 +- src/components/alert/alertCenter.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/alert/alert.stories.svelte b/src/components/alert/alert.stories.svelte index 9b37a3444..cfb6ef918 100644 --- a/src/components/alert/alert.stories.svelte +++ b/src/components/alert/alert.stories.svelte @@ -20,7 +20,7 @@ showAlert( { content, - title, + title: title || undefined, type: type ?? 'error', actions: hasAction ? [ diff --git a/src/components/alert/alertCenter.svelte b/src/components/alert/alertCenter.svelte index 1db762896..418dc3ea8 100644 --- a/src/components/alert/alertCenter.svelte +++ b/src/components/alert/alertCenter.svelte @@ -114,7 +114,7 @@ > 0} hasContentAfter={alert.canDismiss} isToast>
- {alert.title} + {alert.title ?? ""}
{#if alert.canDismiss}