-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'join' of undefined #910
Comments
I'll have a look 👍 |
Ok I get what you mean. We read |
Looks like it's handled here already 🤔 https://github.com/developit/preact-compat/blob/master/src/index.js#L109 @developit could you have a look? ❤️ |
@timneutkens I just checked and I'm not sure I can reproduce the above issue - here's the JSFiddle I set up: https://jsfiddle.net/developit/n144pt7m/ I might be going about the repro wrong though! FWIW I'm not sure L45 of That is to say, this line: typeof children==='string' ? children : children.join('') ...if rendered like this: <HeadManager><AnyThing /><HeadManager> ... will throw an exception, because It seems like this would be an issue when running under React as well, since preact-compat's behavior here is just mimicking React's. Adding an Array check before the join would at least circumvent any exception. |
That is a fair point, we will have to update that. The most minimal example where I can reproduce this is this: https://github.com/timneutkens/next-issue-910. In this case, |
Ah perfect @timneutkens that gives me a great repro. It looks like the bit that adds |
Much appreciated ❤️ |
Should be fixed in |
Thank you very much @developit 👍 💯 |
Thanks @developit |
@developit confirmed it too ❤️ |
Great, thanks a million for surfacing this Tim! |
I am seeing this with:
I want to have a page title containing a bullet character (
... then the title appears as "foo • bar" because the When I switch to:
... the title is set correctly, but this error starts appearing in the browser console, ostensibly because |
ping @timneutkens @rauchg |
@atuttle I am running on the same issue with updating title tag. Did you find a fix or workaround please ? tanks in adavnce |
I'm seeing this issue whenever I navigate on the client-side. If I do a refresh it doesn't occur and the title of the page is correct. |
@donaminos no, no solution or workaround has been provided yet. It's possible that this is not a problem in a more recent version of Next, but I haven't had the chance to upgrade yet. I am just not using any HTML entities in my title, as annoying as that is. |
Does this have any ramifications, or can it be treated as a warning for now? I am using dangerouslySetInnerHTML to unescape special characters in the page's server render, which I suppose isn't a huge deal if I were to stop using it. But I'd prefer to have nice clean titles for the Google. |
This occurs only when including preact.
Steps to reproduce:
The problem arose from the header-manager's method(updateTitle). Preact's VNode exposes just attributes to props with no children, the VNode itself exposes children.
The text was updated successfully, but these errors were encountered: