Fix node remove child - #501
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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
| useEffect(() => { | ||
| function poll() { | ||
| // do not translate the title, in order to prevent Google Translate from breaking the page | ||
| setNoTranslateOnTitle(); | ||
|
|
There was a problem hiding this comment.
Reapply
translate="no" when <title> is regenerated
The new setNoTranslateOnTitle() is called only once from the useEffect with an empty dependency list. In Next.js, client-side navigation replaces the <title> element on every route change, so the translate="no" attribute you set here is removed after the first navigation. When Google Translate runs on the subsequent title nodes, the original Node.removeChild error can recur. Consider re-running setNoTranslateOnTitle() whenever the title changes (e.g., via router events or a MutationObserver) so the fix persists across navigations.
Useful? React with 👍 / 👎.
@jbeard4 I'm having this error
|
|
This error is still happening on Prod @shakilhossain1 @jbeard4
|
|
@shakilhossain1 Can you please check this and resolve merge conflicts? |
…Child: The node to be removed is not a child of this node
75d0975 to
4ee897e
Compare


No description provided.