Fix hydration with empty spread attributes #4647
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we switched from having a single attribute per mount slot to many per mount slot, the hydration logic wasn't changed. We currently only hydrate nodes that have any real attributes attached to them which causes issues with empty spread attributes. They have a slot we need to keep track of where attributes could be inserted in the future, but don't have any attributes today. This PR fixes that issue and adds a regression test
After this, #4640, and #4600 the component library works out of the box with hydration
Fixes #4646