diff --git a/app/frontend/wwwroot/getCookie.js b/app/frontend/wwwroot/getCookie.js index 7bfc7410..8739a37f 100644 --- a/app/frontend/wwwroot/getCookie.js +++ b/app/frontend/wwwroot/getCookie.js @@ -3,8 +3,8 @@ function getCookie(cname) { var ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { var arr = ca[i].split('='); - if (arr[0] == cname) - return arr[1] + if (arr[0].trim() == cname) + return arr[1].trim(); } return ""; } \ No newline at end of file diff --git a/app/maui-blazor/wwwroot/getCookie.js b/app/maui-blazor/wwwroot/getCookie.js index 7bfc7410..8739a37f 100644 --- a/app/maui-blazor/wwwroot/getCookie.js +++ b/app/maui-blazor/wwwroot/getCookie.js @@ -3,8 +3,8 @@ function getCookie(cname) { var ca = decodedCookie.split(';'); for (var i = 0; i < ca.length; i++) { var arr = ca[i].split('='); - if (arr[0] == cname) - return arr[1] + if (arr[0].trim() == cname) + return arr[1].trim(); } return ""; } \ No newline at end of file