Skip to content

Commit

Permalink
fix issue on pages where a AB test variant is not loaded into context…
Browse files Browse the repository at this point in the history
… and this throws an error
  • Loading branch information
biyeun committed Sep 6, 2023
1 parent cb93f3f commit ef5b1a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corehq/apps/analytics/static/analytix/js/hubspot.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ hqDefine('analytix/js/hubspot', [
*/
_utils.loadDemoForm = function () {
let isTrial = _get('isDemoTrial'),
isVariant = _get('demoABv2').version === 'variant',
isVariant = _get('demoABv2') && _get('demoABv2').version === 'variant',
$modal = $('#cta-form-get-demo'),
$form = $('#get-demo-cta-form-content'),
hasInteractedWithForm = false,
Expand Down

0 comments on commit ef5b1a7

Please sign in to comment.