mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -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;
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue