Fix WhatsApp phone parsing crash - #29004
Conversation
|
Thank you for your contribution! 🎉 🔔 @vimtor @xmok @p-gurbani you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="fix/whatsapp-parse-phone-undefined"
FORK_URL="https://github.com/mralonsocorona/extensions.git"
EXTENSION_NAME="whatsapp"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
Greptile SummaryGuards
Confidence Score: 5/5Safe to merge; the logic change is minimal and directly addresses the crash without altering any happy-path behavior. The fix is a small, targeted defensive change — optional chaining on two values that were previously assumed non-null. No existing behavior is altered for users who have the preference set, and the empty-string fallback for undefined input produces a valid CHANGELOG.md needs the date placeholder corrected before merge. Important Files Changed
Reviews (2): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@mralonsocorona). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
* fix(whatsapp): guard phone parsing preferences * Update CHANGELOG.md --------- Co-authored-by: raycastbot <bot@raycast.com>
Summary
Fixes a crash in the WhatsApp extension phone parsing helper when the default country preference is missing.
The
parseUserPhonehelper previously called.trim()directly on the configureddefaultCountry. When that preference is unavailable, the Open Chat command can crash while parsing search input.Changes
parseUserPhoneto safely handle missing input.defaultCountrypreference before trimming it.{PR_MERGE_DATE}.Validation
npm run lintnpm run buildFixes #28921
Fixes #28918