Skip to content

Commit

Permalink
fix: bump @types/webextension-polyfill from 0.10.7 to 0.12.1 (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Oct 6, 2024
1 parent 5eacfee commit 9ce0af3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@types/react-dom": "^18.3.0",
"@types/urijs": "^1.19.25",
"@types/uuid": "^10.0.0",
"@types/webextension-polyfill": "^0.10.7",
"@types/webextension-polyfill": "^0.12.1",
"@types/webpack": "^5.28.5",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
Expand Down
4 changes: 2 additions & 2 deletions src/background/httpClients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ async function verifyPontoonRequestToken(
): Promise<boolean> {
if (token) {
const storageKey = tokenStorageKey(token);
const tokenInfoValue: string | undefined = (
await browser.storage.session.get(storageKey)
const tokenInfoValue = (
(await browser.storage.session.get(storageKey)) as Record<string, string>
)[storageKey];
if (typeof tokenInfoValue === 'string') {
const tokenInfo: TokenInfo = JSON.parse(tokenInfoValue);
Expand Down
4 changes: 2 additions & 2 deletions src/commons/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export async function getOptions<ID extends OptionId>(
optionIds: ID[],
): Promise<OptionValues<ID>> {
const defaultValues = defaultOptionsFor(browserFamily());
const storageItems = await browser.storage.local.get(
const storageItems = (await browser.storage.local.get(
optionIds.map((optionId) => storageKeyFor(optionId)),
);
)) as Record<string, OptionValue<ID>>;
const optionsWithDefaultValues: Partial<OptionValues<ID>> = {};
for (const optionId of optionIds) {
const storageKey = storageKeyFor(optionId);
Expand Down
3 changes: 3 additions & 0 deletions src/commons/webExtensionsApi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ export function listenToMessages<
// no return to allow all listeners to react on the message
action(typedMessade, sender);
}
// always check check other actions if they are subscribed for this message
return undefined;
});
}

Expand All @@ -332,6 +334,7 @@ export function listenToMessagesAndRespond<
// only one listener can send a response
return action(typedMessade, sender);
} else {
// let other actions check if they are subscribed for this message
return undefined;
}
});
Expand Down

0 comments on commit 9ce0af3

Please sign in to comment.