Skip to content

[chore] fix sonar S7741: compare globalThis.window with undefined directly - #6

Merged
YJack0000 merged 1 commit into
mainfrom
chore/sonar-s7741
Aug 23, 2026
Merged

YJack0000 merged 1 commit into
mainfrom
chore/sonar-s7741

Conversation

@YJack0000

Copy link
Copy Markdown
Contributor

Follow-up to #5, which left one new issue on the Quality Gate.

typeof window === "undefined" had to use typeof because a bare window identifier throws a ReferenceError when the global is absent. globalThis.window is an ordinary property access that safely yields undefined instead, so the guard becomes a direct comparison.

  • app/consent/consent-form.tsx:7typeof globalThis.window === "undefined"globalThis.window === undefined

bunx tsc --noEmit and bun run build clean. This should take the Quality Gate on main back to 0 open issues.

…ectly

Follow-up to #5. `globalThis.window` is a property access that never throws,
so the `typeof` guard it inherited from the bare `window` identifier is no
longer needed.
@YJack0000
YJack0000 merged commit 5772765 into main Aug 23, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

✅ SonarQube Quality Gate passed — pathorsAI_pensieve

0 open issues on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant