Skip to content

Commit 9aacdce

Browse files
author
Alejandro Aspinwall
committed
fix(addon): wrap OIDC_USER case in block to satisfy no-case-declarations
The mutual-exclusion read added in the previous commit declared a lexical `const existingAuth` directly in the `case OIDC_USER:` block, tripping eslint's no-case-declarations rule (fails CI lint). Wrap the case body in braces. No behavior change.
1 parent bf74762 commit 9aacdce

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/addon/src/background.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ browser.runtime.onMessage.addListener(async (message, sender) => {
300300
// going through accounts.tb.pro again.
301301
// • Scenario B's authenticateWithAddonToken() can call signinSilent() when
302302
// it only has a refresh token and needs a fresh access_token.
303-
case OIDC_USER:
303+
case OIDC_USER: {
304304
// Mutual exclusion: if STORAGE_KEY_AUTH already holds a session,
305305
// this OIDC_USER is a concurrent login flow (e.g. an AccountHub
306306
// login racing a hamburger-menu web login for the same account)
@@ -324,6 +324,7 @@ browser.runtime.onMessage.addListener(async (message, sender) => {
324324
menuLoggedIn({ username: email });
325325

326326
break;
327+
}
327328

328329
// ----- Web to add-on: Step 7b — provision the Thundermail account -----
329330
// Forwarded from token-bridge.js after handleOIDCCallback() posts OIDC_TOKEN

0 commit comments

Comments
 (0)