You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.2 KiB

diff --git a/node_modules/next/dist/server/render.js b/node_modules/next/dist/server/render.js
index 3a141de..72a8749 100644
--- a/node_modules/next/dist/server/render.js
+++ b/node_modules/next/dist/server/render.js
@@ -752,9 +752,14 @@ async function renderToHTML(req, res, pathname, query, renderOpts) {
// Enabling react concurrent rendering mode: __NEXT_REACT_ROOT = true
const renderShell = async (EnhancedApp, EnhancedComponent)=>{
const content = renderContent(EnhancedApp, EnhancedComponent);
- return await (0, _nodeWebStreamsHelper).renderToInitialStream({
- ReactDOMServer,
- element: content
+ return new Promise((resolve, reject) => {
+ (0, _nodeWebStreamsHelper).renderToInitialStream({
+ ReactDOMServer,
+ element: content,
+ streamOptions: {
+ onError: reject
+ }
+ }).then(resolve, reject);
});
};
const createBodyResult = (initialStream, suffix)=>{