Skip to content

Commit

Permalink
fix: The last of linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 committed Apr 27, 2023
1 parent 0b61319 commit b7b3a3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/worker/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ import { checkTokenValidity } from "../utils/fetchOpenSaucedApiData";
import setAccessTokenInChromeStorage from "../utils/setAccessToken";

chrome.webRequest.onCompleted.addListener(
details => {
chrome.storage.sync.remove(OPEN_SAUCED_AUTH_TOKEN_KEY);
() => {
void chrome.storage.sync.remove(OPEN_SAUCED_AUTH_TOKEN_KEY);
},
{ urls: [SUPABASE_LOGOUT_URL] },
);

chrome.tabs.onUpdated.addListener((tabId, changeInfo) => {
if (changeInfo.url?.includes("github.com")) {
chrome.tabs.sendMessage(tabId, { message: "GITHUB_URL_CHANGED" });
void chrome.tabs.sendMessage(tabId, { message: "GITHUB_URL_CHANGED" });
}
});

chrome.cookies.onChanged.addListener(async changeInfo => {
try {
if (changeInfo.cookie.name != SUPABASE_COOKIE_NAME || changeInfo.cookie.domain != SUPABASE_AUTH_DOMAIN) {
if (changeInfo.cookie.name !== SUPABASE_COOKIE_NAME || changeInfo.cookie.domain !== SUPABASE_AUTH_DOMAIN) {
return;
}
if (changeInfo.removed) {
Expand All @@ -28,7 +28,7 @@ chrome.cookies.onChanged.addListener(async changeInfo => {
if (!isValidToken) {
return chrome.storage.sync.remove(OPEN_SAUCED_AUTH_TOKEN_KEY);
}
setAccessTokenInChromeStorage(changeInfo.cookie.value);
void setAccessTokenInChromeStorage(changeInfo.cookie.value);
} catch (error) {
console.error("Error processing cookie update:", error);
}
Expand Down

0 comments on commit b7b3a3e

Please sign in to comment.