mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
Update packages/astro/src/runtime/client/events.ts
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
This commit is contained in:
parent
001731d224
commit
0a785629ea
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ export const listen = (cb: (...args: any[]) => any) => window.addEventListener(H
|
|||
|
||||
if (!(window as any)[HYDRATE_KEY]) {
|
||||
if ('MutationObserver' in window) {
|
||||
new MutationObserver(() => notify()).observe(document.body, { subtree: true, childList: true });
|
||||
new MutationObserver(notify).observe(document.body, { subtree: true, childList: true });
|
||||
}
|
||||
(window as any)[HYDRATE_KEY] = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue