From bebb8498caba727c43409e142c7a582eca3c555c Mon Sep 17 00:00:00 2001 From: Adriano Interaminense Date: Fri, 27 Sep 2024 13:35:29 -0300 Subject: [PATCH] LPD-37119 Fix themeDisplay is null when using 3rd party website --- modules/apps/analytics/analytics-client-js/src/analytics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps/analytics/analytics-client-js/src/analytics.js b/modules/apps/analytics/analytics-client-js/src/analytics.js index 610653f58e185a..8e310ea01ee50c 100644 --- a/modules/apps/analytics/analytics-client-js/src/analytics.js +++ b/modules/apps/analytics/analytics-client-js/src/analytics.js @@ -483,7 +483,7 @@ class Analytics { ); } else { - const path = themeDisplay.getPathContext() || '/'; + const path = Liferay?.themeDisplay?.getPathContext() || '/'; document.cookie = `${key}=${data}; expires=${expires.toUTCString()}; path=${path}; Secure`; }