Properly await on children before hydrating in Safari (#3891)

This commit is contained in:
Matthew Phillips 2022-07-11 14:10:23 -04:00 committed by GitHub
parent 1cc5b78905
commit 9cf7e40641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix Safari client:visible refresh bug

View file

@ -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)