Skip to content

Commit

Permalink
Properly await on children before hydrating in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Jul 11, 2022
1 parent 1cc5b78 commit 3191c7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/forty-colts-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix Safari client:visible refresh bug
2 changes: 1 addition & 1 deletion packages/astro/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('await-children') || this.firstChild) {
if (!this.hasAttribute('await-children') || this.firstChild) {
this.childrenConnectedCallback();
} else {
// connectedCallback may run *before* children are rendered (ex. HTML streaming)
Expand Down

0 comments on commit 3191c7c

Please sign in to comment.