Skip to content

fix(app): replace Set.intersection() with filter for broad browser compat - #3938

Merged
calebtuttle merged 1 commit into
passportxyz:mainfrom
0xblckmrq:maylynne/fix-set-intersection-crash
Aug 28, 2026
Merged

fix(app): replace Set.intersection() with filter for broad browser compat#3938
calebtuttle merged 1 commit into
passportxyz:mainfrom
0xblckmrq:maylynne/fix-set-intersection-crash

Conversation

@0xblckmrq

Copy link
Copy Markdown
Contributor

Summary

  • PlatformCard.tsx called Set.prototype.intersection(), which is only available in Chrome ≥122, Firefox ≥127, Safari ≥17 — any older browser throws an uncaught TypeError
  • No React error boundary exists in the app, so this crash takes down the entire client-rendered dashboard
  • Fix: replace with [...onchainProviderSet].some(p => providerSet.has(p)) — equivalent logic, universal compatibility

Evidence (Datadog, passport-prod, 7d)

130 error events / 6 sessions / 5 countries (JP, LT, MA, RU, CH) — every sampled browser version (Chrome 109, Iron 118, Chrome 120) is below the real support cutoffs, confirmed via MDN browser-compat-data.

Fixes holonym-foundation/internal-docs#2630

Test plan

  • Confirm PlatformCard still correctly marks stamps as on-chain when activeChainProviders overlaps with platformProviders
  • Confirm it shows off-chain correctly when there's no overlap
  • Smoke-test on an older browser (Chrome <122 or Firefox <127) if possible

🤖 Generated with Claude Code

Set.prototype.intersection() is only available in Chrome 122+, Firefox 127+,
and Safari 17+. Users on older browsers hit an uncaught TypeError that
crashes the entire dashboard (no error boundary exists to contain it).

Replaces the call in PlatformCard with a .some()/.has() loop, which has
universal Set support.

Fixes holonym-foundation/internal-docs#2630

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@0xblckmrq
0xblckmrq requested review from a team and calebtuttle August 25, 2026 16:29
@calebtuttle
calebtuttle merged commit 7de69d5 into passportxyz:main Aug 28, 2026
0 of 2 checks passed
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.

2 participants