Created
June 8, 2021 17:15
-
-
Save kiliman/40b3600c56ca1b084e14bf69e3d38dcb to your computer and use it in GitHub Desktop.
Patch for bug https://github.com/remix-run/remix/issues/189
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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