diff --git a/package-lock.json b/package-lock.json index c2ff2704..96fe2647 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,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", @@ -6040,9 +6040,9 @@ "dev": true }, "node_modules/@types/webextension-polyfill": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.10.7.tgz", - "integrity": "sha512-10ql7A0qzBmFB+F+qAke/nP1PIonS0TXZAOMVOxEUsm+lGSW6uwVcISFNa0I4Oyj0884TZVWGGMIWeXOVSNFHw==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.12.1.tgz", + "integrity": "sha512-xPTFWwQ8BxPevPF2IKsf4hpZNss4LxaOLZXypQH4E63BDLmcwX/RMGdI4tB4VO4Nb6xDBH3F/p4gz4wvof1o9w==", "dev": true }, "node_modules/@types/webpack": { @@ -25230,9 +25230,9 @@ "dev": true }, "@types/webextension-polyfill": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.10.7.tgz", - "integrity": "sha512-10ql7A0qzBmFB+F+qAke/nP1PIonS0TXZAOMVOxEUsm+lGSW6uwVcISFNa0I4Oyj0884TZVWGGMIWeXOVSNFHw==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@types/webextension-polyfill/-/webextension-polyfill-0.12.1.tgz", + "integrity": "sha512-xPTFWwQ8BxPevPF2IKsf4hpZNss4LxaOLZXypQH4E63BDLmcwX/RMGdI4tB4VO4Nb6xDBH3F/p4gz4wvof1o9w==", "dev": true }, "@types/webpack": { diff --git a/package.json b/package.json index ad6e6353..72314afa 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/background/httpClients.ts b/src/background/httpClients.ts index 0293a80d..d7a2b975 100644 --- a/src/background/httpClients.ts +++ b/src/background/httpClients.ts @@ -82,8 +82,8 @@ async function verifyPontoonRequestToken( ): Promise { 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 )[storageKey]; if (typeof tokenInfoValue === 'string') { const tokenInfo: TokenInfo = JSON.parse(tokenInfoValue); diff --git a/src/commons/options.ts b/src/commons/options.ts index 02feac95..757471f6 100644 --- a/src/commons/options.ts +++ b/src/commons/options.ts @@ -30,9 +30,9 @@ export async function getOptions( optionIds: ID[], ): Promise> { 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>; const optionsWithDefaultValues: Partial> = {}; for (const optionId of optionIds) { const storageKey = storageKeyFor(optionId); diff --git a/src/commons/webExtensionsApi/index.ts b/src/commons/webExtensionsApi/index.ts index 62883c8f..c54ae196 100644 --- a/src/commons/webExtensionsApi/index.ts +++ b/src/commons/webExtensionsApi/index.ts @@ -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; }); } @@ -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; } });