From aa5242fdb0e2ae735cba79c0e4d988d8ac93ba02 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 16 May 2025 16:35:18 +0530 Subject: [PATCH] feat: run on callback --- app/javascript/entrypoints/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/entrypoints/ui.js b/app/javascript/entrypoints/ui.js index 8d5857dcf..a6e1f86a8 100644 --- a/app/javascript/entrypoints/ui.js +++ b/app/javascript/entrypoints/ui.js @@ -47,4 +47,6 @@ export const init = async () => { }); }; -window.initChatUI = init; +if (typeof window.chatwootCallback === 'function') { + window.chatwootCallback(init); +}