mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
chore: changeset (#3873)
This commit is contained in:
parent
f9ed77bb0d
commit
957fb50541
3 changed files with 10 additions and 1 deletions
5
.changeset/quiet-pugs-tie.md
Normal file
5
.changeset/quiet-pugs-tie.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix hydration for SSR components that return null
|
|
@ -42,7 +42,7 @@ declare const Astro: {
|
|||
public hydrator: any;
|
||||
static observedAttributes = ['props'];
|
||||
connectedCallback() {
|
||||
if (this.getAttribute('client') === 'only' || this.firstChild) {
|
||||
if (!this.getAttribute('await-children') || this.firstChild) {
|
||||
this.childrenConnectedCallback();
|
||||
} else {
|
||||
// connectedCallback may run *before* children are rendered (ex. HTML streaming)
|
||||
|
|
|
@ -452,6 +452,10 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr
|
|||
|
||||
island.children = `${html ?? ''}${template}`;
|
||||
|
||||
if (island.children) {
|
||||
island.props['await-children'] = ''
|
||||
}
|
||||
|
||||
// Scripts to prepend
|
||||
let prescriptType: PrescriptType = needsHydrationScript
|
||||
? 'both'
|
||||
|
|
Loading…
Reference in a new issue