fix: preserve array query parameters in user redirect#29252
fix: preserve array query parameters in user redirect#29252aayushbaluni wants to merge 1 commit intocalcom:mainfrom
Conversation
Dynamic group redirects rebuilt the query string with URLSearchParams(context.query as Record<string, string>), which coerced string[] values incorrectly. Append each query value explicitly instead. Fixes calcom#28687
|
Welcome to Cal.diy, @aayushbaluni! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change modifies how query string parameters are preserved during redirects for dynamic groups. Instead of directly converting 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
romitg2
left a comment
There was a problem hiding this comment.
mind adding video demo showing before fix and after fix behavior.
|
|
Summary
When redirecting dynamic groups to
/.../dynamic, the query string was built withURLSearchParams(context.query as Record<string, string>). Next.js passesstring | string[] | undefinedper key; array values were not serialized as repeated keys and broke multi-value params.This change builds
URLSearchParamsby appending each value (and each array element) explicitly.Fixes #28687.
Made with Cursor