We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42cb685 commit 0d65aadCopy full SHA for 0d65aad
src/lib/utils/alarm.ts
@@ -9,7 +9,7 @@ export async function setupCookieAlarm(initial = false) {
9
permissions: ['alarms', 'cookies'],
10
})) as boolean;
11
12
- if (!granted) {
+ if (!granted || !chrome.alarms) {
13
return;
14
}
15
@@ -32,7 +32,7 @@ export async function setupCookieAlarm(initial = false) {
32
33
34
function createAlarmListener() {
35
- chrome.alarms.onAlarm.addListener(async (alarm) => {
+ chrome.alarms?.onAlarm?.addListener(async (alarm) => {
36
if (alarm.name !== COOKIE_ALARM_NAME) {
37
38
0 commit comments