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 <[email protected]>
  • Loading branch information
natemoo-re and matthewp authored May 27, 2022
1 parent 6fdf406 commit 368d375
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 368d375

Please sign in to comment.