Skip to content

Commit

Permalink
Update packages/remix-dev/vite/static/refresh-utils.cjs
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Brophy <[email protected]>
  • Loading branch information
xSyki and brophdawg11 authored Oct 3, 2024
1 parent 6351936 commit 081b287
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/remix-dev/vite/static/refresh-utils.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ function debounce(fn, delay) {
const enqueueUpdate = debounce(async () => {
let manifest;
if (routeUpdates.size > 0) {
manifest = structuredClone(__remixManifest);
manifest = typeof structuredClone === 'function' ?
structuredClone(__remixManifest) :
JSON.parse(JSON.stringify(__remixManifest));

for (let route of routeUpdates.values()) {
manifest.routes[route.id] = route;
Expand Down

0 comments on commit 081b287

Please sign in to comment.