-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
<svelte:head> empty <title> error handling #2980
Comments
(useless comment): same here, I was on the point to open the same issue :) |
OK but why not just leave the title off or bind it to something? |
I think it should not crash at all to be honest, an empty title tag is valid, no framework should reinterpret html. But if it does crash because of this, it should at least throw an error that explains the issue is the empty tag. Otherwise we have people all over the world debugging this over and over again, and putting the head section with an empty title as placeholder for later modification is not uncommon. |
This is actually a Svelte bug - I've transferred the issue. |
When using an empty
<title>
tag in<svelte:head>
a client error will be thrown.To reproduce add this in routes/index.svelte:
The error is:
Cannot read property 'data' of undefined
.When trying to build the full stack trace is visible (hidden in dev mode):
This is confusing when an empty title tag is used (when starting a new project and leaving it empty as a placeholder), as the error is not helpful. Adding content inside the tag will work just fine.
The text was updated successfully, but these errors were encountered: