-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update logic for default true configs in AM, Chartbeat, GA and GoogleAds #1693
Conversation
WalkthroughWalkthroughThe recent updates across various analytics integration packages focus on refining how default values are assigned in JavaScript. By replacing the logical OR operator ( Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1693 +/- ##
========================================
Coverage 53.93% 53.93%
========================================
Files 461 461
Lines 15616 15616
Branches 3089 3097 +8
========================================
Hits 8422 8422
+ Misses 5928 5878 -50
- Partials 1266 1316 +50 ☔ View full report in Codecov by Sentry. |
size-limit report 📦
|
|
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
Hello! This PR has been open for 20 days without any activity. Therefore, it's considered as stale and is scheduled to be closed in 10 days. If you're still working on this, please remove the 'Stale' label or add a comment to keep it open. Thanks for your contribution! |
PR Description
In the integration SDK's constructor, where we retrieve values from the destination configuration object, we often define default values for some fields.
In some of the integrations, it is incorrectly done for the boolean fields.
const configFieldValue = config.someFieldName || true;
The above logic is in place to ensure that we use a default value true if the field's value is not defined. However, it'll still fall back to the default value even if the field's actual value is false due to the || true condition.
So, even if the user toggles the field to off in the UI, the integration will always treat is on. Essentially, the field's value is hardcoded.
Linear task (optional)
Resolves INT-1805
Cross Browser Tests
Please confirm you have tested for the following browsers:
Sanity Suite
Security
Summary by CodeRabbit
null
orundefined
values more accurately.