Skip to content

Commit dc79eb7

Browse files
bkahostep
authored andcommitted
Backport PR-9713 for Magento 2.1 - stringify cookie value to fix #5596
(cherry picked from commit a4daf56)
1 parent 6065b1c commit dc79eb7

File tree

1 file changed

+4
-1
lines changed
  • app/code/Magento/Cookie/view/frontend/web/js

1 file changed

+4
-1
lines changed

app/code/Magento/Cookie/view/frontend/web/js/notices.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ define([
2020
$(this.options.cookieAllowButtonSelector).on('click', $.proxy(function() {
2121
var cookieExpires = new Date(new Date().getTime() + this.options.cookieLifetime * 1000);
2222

23-
$.mage.cookies.set(this.options.cookieName, this.options.cookieValue, {expires: cookieExpires});
23+
$.mage.cookies.set(this.options.cookieName, JSON.stringify(this.options.cookieValue), {
24+
expires: cookieExpires
25+
});
26+
2427
if ($.mage.cookies.get(this.options.cookieName)) {
2528
window.location.reload();
2629
} else {

0 commit comments

Comments
 (0)