Skip to content
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

Template tags that end with a whitespace cause an error #108

Open
oskarrough opened this issue Aug 6, 2023 · 0 comments
Open

Template tags that end with a whitespace cause an error #108

oskarrough opened this issue Aug 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@oskarrough
Copy link

Template tags that end with a whitespace cause an error. Here's an example. Notice the whitespace between </host> and the ending backtick.

function component() {
  return html`<host><p>Hello</p></host> `
}

Uncaught (in promise) TypeError: result.render is not a function

from https://github.com/atomicojs/atomico/blob/master/src/element/custom-element.js#L138-L139/

If I remove the whitespace, all is good. You could argue, why put a whitespace there anyway? And that's a fair question, but prettier is doing that for whatever reason.

  • Browser Edge 115.0
  • Vite 4.4.8
  • Atomico 1.72.0

Expected behavior

I'd expect the template to render whether it ends in a whitespace or not.

@oskarrough oskarrough added the bug Something isn't working label Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant