From 5bc2197182ed9b96c7d0fdc48c3321851d04642d Mon Sep 17 00:00:00 2001 From: becarta Date: Fri, 18 Jul 2025 08:42:12 +0200 Subject: [PATCH] Enhance RocketChat livechat integration with improved error handling - Refactored the script for initializing the RocketChat livechat widget to include error handling for script loading failures. - Ensured the RocketChat object is properly initialized and handles cases where it may not exist. - Added a check for DOM readiness before loading the livechat script, improving reliability and user experience. --- src/layouts/Layout.astro | 49 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 96195ea..b02c17b 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -86,12 +86,51 @@ const { language, textDirection } = I18N; -