Skip to content

Commit

Permalink
chore: changeset (withastro#3873)
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed Jul 8, 2022
1 parent 76c11b0 commit d1646f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/server/astro-island.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/runtime/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit d1646f2

Please sign in to comment.