Skip to content

Commit

Permalink
Fix getABTestPluginHome login to send when value is set
Browse files Browse the repository at this point in the history
  • Loading branch information
wpalani committed Nov 29, 2023
1 parent 10874d1 commit f19e8f0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions static/js/deactivation-survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@
'page': window.location.href
}

if (getABTestPluginHome()) {
eventData.abTestPluginHome = true;
// Attach abTestPluginHome flag value if exists
if (typeof getABTestPluginHome() === 'boolean') {
eventData.abTestPluginHome = getABTestPluginHome();
}

await fetch(runtimeData.eventsEndpoint, {
Expand All @@ -155,9 +156,7 @@
const getABTestPluginHome = () => {
const { NewfoldRuntime } = window;

return (
NewfoldRuntime?.capabilities?.abTestPluginHome === true
);
return NewfoldRuntime?.capabilities?.abTestPluginHome;
}

// Attach events listeners
Expand Down

0 comments on commit f19e8f0

Please sign in to comment.