Merge pull request #21522 from gustavotrott/fix-lad-cookie-cross-domain

fix (html5): prevent error if `learningDashboardBase` is missing
This commit is contained in:
Anton Georgiev 2024-10-24 10:25:58 -04:00 committed by GitHub
commit 0cba072672
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,7 +76,7 @@ const setLearningDashboardCookie = () => {
// In a cluster setup it will be necessary to specify the root domain // In a cluster setup it will be necessary to specify the root domain
// because the Dashboard might be in a different subdomain // because the Dashboard might be in a different subdomain
if (learningDashboardBase.startsWith('http')) { if (learningDashboardBase && learningDashboardBase.startsWith('http')) {
const commonDomain = findCommonDomain(learningDashboardBase, window.location.href); const commonDomain = findCommonDomain(learningDashboardBase, window.location.href);
if (commonDomain !== '') { if (commonDomain !== '') {
cookieString += `;domain=${commonDomain}`; cookieString += `;domain=${commonDomain}`;