mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
Properly await on children before hydrating in Safari (#3891)
This commit is contained in:
parent
1cc5b78905
commit
9cf7e40641
2 changed files with 6 additions and 1 deletions
5
.changeset/forty-colts-ring.md
Normal file
5
.changeset/forty-colts-ring.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix Safari client:visible refresh bug
|
|
@ -42,7 +42,7 @@ declare const Astro: {
|
||||||
public hydrator: any;
|
public hydrator: any;
|
||||||
static observedAttributes = ['props'];
|
static observedAttributes = ['props'];
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
if (!this.getAttribute('await-children') || this.firstChild) {
|
if (!this.hasAttribute('await-children') || this.firstChild) {
|
||||||
this.childrenConnectedCallback();
|
this.childrenConnectedCallback();
|
||||||
} else {
|
} else {
|
||||||
// connectedCallback may run *before* children are rendered (ex. HTML streaming)
|
// connectedCallback may run *before* children are rendered (ex. HTML streaming)
|
||||||
|
|
Loading…
Reference in a new issue