1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

Should also decode cookie value when reading.

This solves encoding issues and closes #39
This commit is contained in:
Ivar 2017-01-24 11:45:46 +01:00
parent 617d374c06
commit f56118ac0f

View File

@ -24,7 +24,7 @@ function writeCookie (userName) {
function getInitState () { function getInitState () {
const userName = readCookie(COOKIE_NAME); const userName = decodeURIComponent(readCookie(COOKIE_NAME));
const showDialog = !userName; const showDialog = !userName;
return new $Map({ userName, showDialog }); return new $Map({ userName, showDialog });
} }