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, {}); } }