fix: Return if window.$chatwoot is already defined (#3847)
This commit is contained in:
parent
8cff690640
commit
23965fbaa3
1 changed files with 4 additions and 0 deletions
|
@ -27,6 +27,10 @@ export const hasUserKeys = user =>
|
||||||
REQUIRED_USER_KEYS.reduce((acc, key) => acc || !!user[key], false);
|
REQUIRED_USER_KEYS.reduce((acc, key) => acc || !!user[key], false);
|
||||||
|
|
||||||
const runSDK = ({ baseUrl, websiteToken }) => {
|
const runSDK = ({ baseUrl, websiteToken }) => {
|
||||||
|
if (window.$chatwoot) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const chatwootSettings = window.chatwootSettings || {};
|
const chatwootSettings = window.chatwootSettings || {};
|
||||||
window.$chatwoot = {
|
window.$chatwoot = {
|
||||||
baseUrl,
|
baseUrl,
|
||||||
|
|
Loading…
Reference in a new issue