Skip to content

Commit

Permalink
[AlertCenter]: fixes 'undefined' title when no title provided
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanBreck committed Dec 9, 2024
1 parent 469cdc2 commit 8cc827d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/alert/alert.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
showAlert(
{
content,
title,
title: title || undefined,
type: type ?? 'error',
actions: hasAction
? [
Expand Down
2 changes: 1 addition & 1 deletion src/components/alert/alertCenter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
>
<svelte:component this={alert.component || Alert} {...alert} hasActions={alert.actions.length > 0} hasContentAfter={alert.canDismiss} isToast>
<div slot="title">
{alert.title}
{alert.title ?? ""}
</div>
<svelte:fragment slot='content-after'>
{#if alert.canDismiss}
Expand Down

0 comments on commit 8cc827d

Please sign in to comment.