From 308da3c890eccc525001715b489713b49963399d Mon Sep 17 00:00:00 2001 From: "John W. Ellis" Date: Wed, 7 Mar 2018 12:29:18 -0500 Subject: [PATCH] fixes #2229 - Edge cookie string form --- modules/yieldbotBidAdapter.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/yieldbotBidAdapter.js b/modules/yieldbotBidAdapter.js index 4616a31ea3d..bf21613e31f 100644 --- a/modules/yieldbotBidAdapter.js +++ b/modules/yieldbotBidAdapter.js @@ -535,13 +535,13 @@ export const YieldbotAdapter = { }, setCookie: function(name, value, expireMillis, path, domain, secure) { - const expireTime = expireMillis ? new Date(Date.now() + expireMillis).toGMTString() : ''; const dataValue = encodeURIComponent(value); - const docLocation = path || ''; - const pageDomain = domain || ''; - const httpsOnly = secure ? ';secure' : ''; + const cookieStr = name + '=' + dataValue + + (expireMillis ? ';expires=' + new Date(Date.now() + expireMillis).toGMTString() : '') + + (path ? ';path=' + path : '') + + (domain ? ';domain=' + domain : '') + + (secure ? ';secure' : ''); - const cookieStr = `${name}=${dataValue};expires=${expireTime};path=${docLocation};domain=${pageDomain}${httpsOnly}`; document.cookie = cookieStr; },