fix: infinite recursion in getReferrer() crashing all pages#162
Conversation
getReferrer was calling itself instead of document.referrer. This caused RangeError: Maximum call stack size exceeded, preventing the Vue app from mounting on all pages.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA self-recursive bug in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
URGENT
getReferrer()in analytics.ts calls itself instead ofdocument.referrer, causingRangeError: Maximum call stack size exceeded. This crashes the Vue app on ALL pages — the homepage shows no languages, game pages don't load.Fix
Introduced in PR #159 (slim GA4 refactor) — the
replace_alledit that replaceddocument.referrer || 'direct'withgetReferrer()also caught the function definition itself.Summary by CodeRabbit
Bug Fixes