Skip to content

Instantly share code, notes, and snippets.

@kiliman
Created June 8, 2021 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiliman/40b3600c56ca1b084e14bf69e3d38dcb to your computer and use it in GitHub Desktop.
Save kiliman/40b3600c56ca1b084e14bf69e3d38dcb to your computer and use it in GitHub Desktop.
diff --git a/node_modules/@remix-run/node/server.js b/node_modules/@remix-run/node/server.js
index 2a96bd3..e0e2a34 100644
--- a/node_modules/@remix-run/node/server.js
+++ b/node_modules/@remix-run/node/server.js
@@ -100,6 +100,7 @@ async function handleDocumentRequest(request, loadContext, build, routes, server
};
let actionErrored = false;
+ let clone = request.clone();
if (isActionRequest(request)) {
let leafMatch = matches[matches.length - 1];
@@ -120,7 +121,7 @@ async function handleDocumentRequest(request, loadContext, build, routes, server
// handled in node. We use a .catch() handler on each promise to avoid the
// warning, then handle errors manually afterwards.
- let routeLoaderPromises = matchesToLoad.map(match => data.loadRouteData(build, match.route.id, request.clone(), loadContext, match.params).catch(error => error));
+ let routeLoaderPromises = matchesToLoad.map(match => data.loadRouteData(build, match.route.id, clone, loadContext, match.params).catch(error => error));
let routeLoaderResults = await Promise.all(routeLoaderPromises);
for (let [index, response] of routeLoaderResults.entries()) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment