Repository navigation
chore: fix null undefined check by optional chaining - #4254
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Allure Test reports for this run are available at:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## hotfix/20250414 #4254 +/- ##
================================================
Coverage 91.17% 91.17%
================================================
Files 632 632
Lines 33079 33079
Branches 7831 7828 -3
================================================
Hits 30160 30160
- Misses 2674 2704 +30
+ Partials 245 215 -30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



What are the changes introduced in this PR?
This pull request includes changes to improve the robustness of the code by adding optional chaining to several properties in the
pixelUtils.jsfile. The most important changes include modifications to thecartViewedEventBuilder,checkoutEventBuilder, andcheckoutStepEventBuilderfunctions.Improvements to robustness:
src/sources/shopify/webpixelTransformations/pixelUtils.js: Modified thecartViewedEventBuilderfunction to use optional chaining for accessingcart.idto prevent potential runtime errors.src/sources/shopify/webpixelTransformations/pixelUtils.js: Modified thecheckoutEventBuilderfunction to use optional chaining for accessingcheckout.tokento prevent potential runtime errors.src/sources/shopify/webpixelTransformations/pixelUtils.js: Modified thecheckoutStepEventBuilderfunction to use optional chaining for accessingsearchResult.queryto prevent potential runtime errors.What is the related Linear task?
Resolves INT-XXX
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.