Skip to content

Commit a2adc75

Browse files
committed
fix: restore null semantics for native notification url parameter
1 parent fd4789a commit a2adc75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/renderer/utils/system/native.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ describe('renderer/utils/system/native.ts', () => {
4949
expect(window.gitify.raiseNativeNotification).toHaveBeenCalledWith(
5050
'Gitify',
5151
'You have 2 notifications',
52-
'',
52+
undefined,
5353
);
5454
expect(url.generateGitHubWebUrl).toHaveBeenCalledTimes(0);
5555
});

src/renderer/utils/system/native.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export async function raiseNativeNotification(
1818
) {
1919
let title: string;
2020
let body: string;
21-
let url = '';
21+
let url: string | null = null;
2222

2323
if (notifications.length === 1) {
2424
const notification = notifications[0];
@@ -32,5 +32,5 @@ export async function raiseNativeNotification(
3232
body = `You have ${notifications.length} notifications`;
3333
}
3434

35-
return window.gitify.raiseNativeNotification(title, body, url);
35+
return window.gitify.raiseNativeNotification(title, body, url ?? undefined);
3636
}

0 commit comments

Comments
 (0)