Skip to content

Commit

Permalink
Update packages/astro/src/runtime/client/events.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
  • Loading branch information
2 people authored and Nate Moore committed May 27, 2022
1 parent 001731d commit 0a78562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/runtime/client/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 0a78562

Please sign in to comment.