From 891de68f921b803e59557a6fb4a12082adcbd108 Mon Sep 17 00:00:00 2001 From: "Project Collection Build Service (uzinakod)" Date: Fri, 15 Nov 2024 12:31:11 -0500 Subject: [PATCH] Fix getCookie js function --- app/frontend/wwwroot/getCookie.js | 4 ++-- app/maui-blazor/wwwroot/getCookie.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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