Skip to content

Commit 912f16f

Browse files
committed
fix: notification title as null
1 parent 8457594 commit 912f16f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/lib/components/dashboard/sidebar/Sidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
(item) => item.login === (notification.creator?.login || notification.author?.login)
3131
);
3232
33-
const searched = notification.title.toLowerCase().includes(search.toLowerCase());
33+
const searched = notification.title?.toLowerCase().includes(search.toLowerCase());
3434
const isOfType = $typeFilters.some(
3535
(filter) => filter.active && filter.type === notification.type
3636
);

src/lib/features/createGitlabNotificationData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export async function createGitlabNotificationData(
206206
...textData,
207207
type: 'commit',
208208
icon: 'commit',
209-
title: firstEvent.push_data.commit_title
209+
title: firstEvent.push_data.commit_title ?? ''
210210
};
211211
} else {
212212
value = {

src/lib/types/gitlab-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export type GitlabEvent = {
5050
push_data: {
5151
action: 'created' | 'pushed';
5252
commit_count: number;
53-
commit_title: string;
53+
commit_title: string | null;
5454
ref: string;
5555
ref_type: 'branch' | 'tag';
5656
};

0 commit comments

Comments
 (0)