Skip to content

Commit 6e24474

Browse files
apply changes from to , update next patch to canary.46
1 parent cc2d908 commit 6e24474

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

patches/next+15.0.0-rc.0.patch renamed to patches/next+15.0.0-canary.46.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
diff --git a/node_modules/next/dist/server/render.js b/node_modules/next/dist/server/render.js
2-
index 73cf44c..f3d9022 100644
2+
index ed5eda3..6d4a57b 100644
33
--- a/node_modules/next/dist/server/render.js
44
+++ b/node_modules/next/dist/server/render.js
55
@@ -815,9 +815,14 @@ async function renderToHTMLImpl(req, res, pathname, query, renderOpts, extra) {
66
// Always using react concurrent rendering mode with required react version 18.x
77
const renderShell = async (EnhancedApp, EnhancedComponent)=>{
88
const content = renderContent(EnhancedApp, EnhancedComponent);
99
- return await (0, _nodewebstreamshelper.renderToInitialFizzStream)({
10-
- ReactDOMServer: _serverbrowser.default,
10+
- ReactDOMServer: _serveredge.default,
1111
- element: content
1212
+ return new Promise((resolve, reject) => {
1313
+ (0, _nodewebstreamshelper.renderToInitialStream)({

src/pages/errors/[errorCode].tsx

+13-18
Original file line numberDiff line numberDiff line change
@@ -53,32 +53,27 @@ export default function ErrorDecoderPage({
5353
}
5454

5555
// Deserialize a client React tree from JSON.
56-
function reviveNodeOnClient(key: unknown, val: any) {
56+
function reviveNodeOnClient(parentPropertyName: unknown, val: any) {
5757
if (Array.isArray(val) && val[0] == '$r') {
5858
// Assume it's a React element.
59-
let type = val[1];
59+
let Type = val[1];
6060
let key = val[2];
61+
if (key == null) {
62+
key = parentPropertyName; // Index within a parent.
63+
}
6164
let props = val[3];
62-
if (type === 'wrapper') {
63-
type = Fragment;
65+
if (Type === 'wrapper') {
66+
Type = Fragment;
6467
props = {children: props.children};
6568
}
66-
if (type in MDXComponents) {
67-
type = MDXComponents[type as keyof typeof MDXComponents];
69+
if (Type in MDXComponents) {
70+
Type = MDXComponents[Type as keyof typeof MDXComponents];
6871
}
69-
if (!type) {
70-
console.error('Unknown type: ' + type);
71-
type = Fragment;
72+
if (!Type) {
73+
console.error('Unknown type: ' + Type);
74+
Type = Fragment;
7275
}
73-
return {
74-
$$typeof: Symbol.for('react.transitional.element'),
75-
type: type,
76-
key: key,
77-
ref: null,
78-
props: props,
79-
_store: {},
80-
_owner: null,
81-
};
76+
return <Type key={key} {...props} />;
8277
} else {
8378
return val;
8479
}

0 commit comments

Comments
 (0)