summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-07-11 14:10:23 -0400
committerGravatar GitHub <noreply@github.com> 2022-07-11 14:10:23 -0400
commit9cf7e406412bcc9c1a17b57072dc1c4a1b94b635 (patch)
treeecd986f6b2cafd96f738096a65659473f4722211
parent1cc5b78905633608e5b07ad291f916f54e67feb1 (diff)
downloadastro-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.md5
-rw-r--r--packages/astro/src/runtime/server/astro-island.ts2
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)