diff options
author | 2022-07-11 14:10:23 -0400 | |
---|---|---|
committer | 2022-07-11 14:10:23 -0400 | |
commit | 9cf7e406412bcc9c1a17b57072dc1c4a1b94b635 (patch) | |
tree | ecd986f6b2cafd96f738096a65659473f4722211 | |
parent | 1cc5b78905633608e5b07ad291f916f54e67feb1 (diff) | |
download | astro-9cf7e406412bcc9c1a17b57072dc1c4a1b94b635.tar.gz astro-9cf7e406412bcc9c1a17b57072dc1c4a1b94b635.tar.zst astro-9cf7e406412bcc9c1a17b57072dc1c4a1b94b635.zip |
Properly await on children before hydrating in Safari (#3891)
-rw-r--r-- | .changeset/forty-colts-ring.md | 5 | ||||
-rw-r--r-- | packages/astro/src/runtime/server/astro-island.ts | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/forty-colts-ring.md b/.changeset/forty-colts-ring.md new file mode 100644 index 000000000..d251d78ec --- /dev/null +++ b/.changeset/forty-colts-ring.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix Safari client:visible refresh bug diff --git a/packages/astro/src/runtime/server/astro-island.ts b/packages/astro/src/runtime/server/astro-island.ts index d3a22a5c2..d2cf57d6c 100644 --- a/packages/astro/src/runtime/server/astro-island.ts +++ b/packages/astro/src/runtime/server/astro-island.ts @@ -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) |