We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd74dc1 commit dceee19Copy full SHA for dceee19
1 file changed
app/js/utils/urls.mjs
@@ -115,11 +115,16 @@ export function getParamsFromURL(
115
}
116
117
// Pour ouvrir un nouveau chatbot
118
-export function goToNewChatbot(urlNewChatbot) {
+export function goToNewChatbot(
119
+ urlNewChatbot,
120
+ URLbaseChatbot = window.location.origin,
121
+) {
122
if (urlNewChatbot && urlNewChatbot.indexOf(".") > -1) {
- const fullUrl = window.location.origin + `/#${urlNewChatbot}`;
123
+ URLbaseChatbot =
124
+ !URLbaseChatbot || URLbaseChatbot == "null" ? "" : URLbaseChatbot;
125
+ const fullUrl = URLbaseChatbot + `/#${urlNewChatbot}`;
126
window.open(fullUrl, "_blank");
127
} else {
- alert("Veuillez entrer une URL valide.");
128
+ window.alert("Veuillez entrer une URL valide.");
129
130
0 commit comments