From 13270cd733c35bf6b30c1e8ef9be3685b01b3d02 Mon Sep 17 00:00:00 2001 From: Waheed Ahmed Date: Tue, 13 Jul 2021 19:18:38 +0500 Subject: [PATCH] fix: user info cookie name for Edge (#28170) We were generating cookie name for only stage and prod, the script was raising an error on the Edge environment. VAN-659 --- lms/static/js/student_account/utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lms/static/js/student_account/utils.js b/lms/static/js/student_account/utils.js index 2781fbe196..4c2ac49da8 100644 --- a/lms/static/js/student_account/utils.js +++ b/lms/static/js/student_account/utils.js @@ -10,6 +10,7 @@ var hostname = this.getHostname(); var isLocalhost = hostname.indexOf('localhost') >= 0; var isStage = hostname.indexOf('stage') >= 0; + var isEdge = hostname.indexOf('edge') >= 0; var cookie, edxUserCookie, prefix, user, userCookie; if (isLocalhost) { @@ -18,6 +19,7 @@ } else { // does not take sandboxes into account prefix = isStage ? 'stage' : 'prod'; + prefix = isEdge ? 'edge' : prefix; edxUserCookie = prefix + '-edx-user-info'; }