handle cases where aap.learningDashboardBase is missing

This commit is contained in:
Gustavo Trott 2024-10-24 11:22:50 -03:00
parent 3710aa2501
commit c3329d6b97

View File

@ -76,7 +76,7 @@ const setLearningDashboardCookie = () => {
// In a cluster setup it will be necessary to specify the root domain
// 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);
if (commonDomain !== '') {
cookieString += `;domain=${commonDomain}`;