Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 374608a4da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (currentScript && currentScript.src) { | ||
| return currentScript.src; |
There was a problem hiding this comment.
Validate currentScript before using it as Twemoji base
getBotChatScriptSrc() returns document.currentScript.src unconditionally, so when BotChat.App() is invoked from another external script (for example /app.js), Twemoji asset URLs are derived from that caller script directory instead of the BotChat bundle directory. In that context, early emoji renders (such as during initialization paths that call twemoji.parse) resolve to the wrong twemoji/svg/*.svg path and 404. This branch should only be used when currentScript.src matches the BotChat filename pattern, otherwise continue scanning script tags.
Useful? React with 👍 / 👎.
No description provided.