Skip to content

Commit 7a01849

Browse files
authored
Fix notification sound not playing (#274)
1 parent 8b254f3 commit 7a01849

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/lib/notifications-service.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ export async function showNotifications(notifications) {
118118
}
119119
}
120120

121-
export async function playNotificationSound() {
121+
export function playNotificationSound() {
122122
const audio = new Audio();
123-
audio.src = await browser.extension.getURL('/sounds/bell.ogg');
123+
audio.src = browser.runtime.getURL('sounds/bell.ogg');
124124
audio.play();
125125
}
126126

@@ -138,8 +138,8 @@ export async function checkNotifications(lastModified) {
138138
/* eslint-enable camelcase */
139139
}
140140

141-
if (playNotifSound && notifications.length > 1) {
142-
await playNotificationSound();
141+
if (playNotifSound && notifications.length > 0) {
142+
playNotificationSound();
143143
}
144144

145145
if (showDesktopNotif) {

0 commit comments

Comments
 (0)