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

Don't create a fragment at all for DOM-less components #2200

Closed
Rich-Harris opened this issue Mar 10, 2019 · 1 comment · Fixed by #3831
Closed

Don't create a fragment at all for DOM-less components #2200

Rich-Harris opened this issue Mar 10, 2019 · 1 comment · Fixed by #3831

Comments

@Rich-Harris
Copy link
Member

Not a frequent occurrence, but it does happen, e.g. the <MapMarker> component in https://v3.svelte.technology/tutorial/context-api

@EmilTholin
Copy link
Member

I've looked into this a bit, and I wonder if it isn't nicer just to keep a DOM-less component fragment looking like this...

function create_fragment(ctx) {
  return { c: noop, l: noop, m: noop, p: noop, i: noop, o: noop, d: noop };
}

...rather than checking for the existence of $$.fragment throughout the runtime code, since it's such a special case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants