@xapp/chat-widget 1.36.3 → 1.36.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -7471,11 +7471,12 @@ function useExternalScript(url) {
|
|
|
7471
7471
|
return;
|
|
7472
7472
|
}
|
|
7473
7473
|
var id = getSrcId(url);
|
|
7474
|
-
var
|
|
7475
|
-
if (!
|
|
7474
|
+
var existing = document.getElementById(id);
|
|
7475
|
+
if (!existing) {
|
|
7476
7476
|
var script = document.createElement("script");
|
|
7477
7477
|
script.id = id;
|
|
7478
7478
|
script.src = url;
|
|
7479
|
+
script.crossOrigin = 'anonymous';
|
|
7479
7480
|
document.head.appendChild(script);
|
|
7480
7481
|
}
|
|
7481
7482
|
}, [url]);
|
|
@@ -8058,7 +8059,7 @@ var MessageList = function (props) {
|
|
|
8058
8059
|
var messagesEndRef = React$1.useRef(null);
|
|
8059
8060
|
React$1.useEffect(function () {
|
|
8060
8061
|
messagesEndRef.current.scrollIntoView({ behavior: "smooth" });
|
|
8061
|
-
}, [props.messages]);
|
|
8062
|
+
}, [props.messages, props.agents]);
|
|
8062
8063
|
var handleSend = React$1.useCallback(function (msg) {
|
|
8063
8064
|
onSend(msg);
|
|
8064
8065
|
messagesEndRef.current.scrollIntoView({ behavior: "smooth" });
|