From 4ff02c50a418a97c37cfbd283c77e555c4e1d92f Mon Sep 17 00:00:00 2001 From: Manjinder Singh <49171515+jinder1s@users.noreply.github.com> Date: Mon, 30 Aug 2021 15:41:32 -0400 Subject: [PATCH] feat: fixing javascript in sandbox (#28565) --- lms/static/js/student_account/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/static/js/student_account/utils.js b/lms/static/js/student_account/utils.js index 4c2ac49da8..fb539b658c 100644 --- a/lms/static/js/student_account/utils.js +++ b/lms/static/js/student_account/utils.js @@ -9,11 +9,12 @@ userFromEdxUserCookie: function() { var hostname = this.getHostname(); var isLocalhost = hostname.indexOf('localhost') >= 0; + var isSandbox = hostname.indexOf('sandbox') >=0; var isStage = hostname.indexOf('stage') >= 0; var isEdge = hostname.indexOf('edge') >= 0; var cookie, edxUserCookie, prefix, user, userCookie; - if (isLocalhost) { + if (isLocalhost || isSandbox) { // localhost doesn't have prefixes edxUserCookie = 'edx-user-info'; } else {