Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Hydrate on first load, not destroy #93

Merged
merged 2 commits into from
Jan 20, 2018
Merged

Conversation

chexxor
Copy link
Contributor

@chexxor chexxor commented Jan 19, 2018

I installed the svelte-hackernews project and put a trace on this line and saw that hydrate is false on the first load. The component var in the runtime is still undefined, so !!component evaluates to false. To hydrate on the first load, when component is undefined, it should be !component.

Can squash, if you merge.

@Rich-Harris Rich-Harris merged commit 90cd347 into sveltejs:master Jan 20, 2018
@Rich-Harris
Copy link
Member

Thank you! Have added a test for this — it seems Svelte's hydration doesn't quite work as expected in slotted content, which we'll have to look into.

@Rich-Harris
Copy link
Member

Finally released in 0.6.0

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

Successfully merging this pull request may close these issues.

None yet

2 participants