mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 13:26:13 +00:00
Fix chatwoot import issue by checking whether we're in an execution environment before loading the script
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
(function (d, t) {
|
||||
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
|
||||
|
||||
// Only execute on client-side
|
||||
if (ExecutionEnvironment.canUseDOM) {
|
||||
(function (d, t) {
|
||||
var BASE_URL = "https://app.chatwoot.com";
|
||||
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
|
||||
g.src = BASE_URL + "/packs/js/sdk.js";
|
||||
@@ -11,4 +15,5 @@
|
||||
baseUrl: BASE_URL
|
||||
})
|
||||
}
|
||||
})(document, 'script');
|
||||
})(document, 'script');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user