From 5ca2273b475e0b91316aa643c49f7cd7d2ea2b04 Mon Sep 17 00:00:00 2001 From: Katie Date: Thu, 18 Aug 2022 11:56:22 -0400 Subject: [PATCH] CSR-759 Ensure funnel cookie is created if it doesn't exist --- src/helpers/heritage-integration/cookie-helper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/heritage-integration/cookie-helper.js b/src/helpers/heritage-integration/cookie-helper.js index dc1872e74..3eed5950b 100644 --- a/src/helpers/heritage-integration/cookie-helper.js +++ b/src/helpers/heritage-integration/cookie-helper.js @@ -137,10 +137,10 @@ function setFunnelCookieProperties(properties) { Object.keys(properties).forEach(key => { cookie[key] = properties[key]; }); - - const cookieValueJson = JSON.stringify(cookie); - createOrUpdateCookie(cookieNames.FUNNEL_SESSION_INFO, cookieValueJson, {}); } + + const cookieValueJson = JSON.stringify(cookie ?? {}); + createOrUpdateCookie(cookieNames.FUNNEL_SESSION_INFO, cookieValueJson, {}); } }