Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f7f8451

Browse files
committedJun 11, 2024·
update test
1 parent 6e21c6f commit f7f8451

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed
 

‎packages/react-server-dom-turbopack/src/ReactFlightTurbopackReferences.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const deepProxyHandlers = {
136136
case 'then':
137137
throw new Error(
138138
`Cannot await or return from a thenable. ` +
139-
`You cannot await a client module from a server component.`
139+
`You cannot await a client module from a server component.`,
140140
);
141141
}
142142
// eslint-disable-next-line react-internal/safe-string-coercion

‎packages/react-server-dom-webpack/src/ReactFlightWebpackReferences.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const deepProxyHandlers = {
144144
case 'then':
145145
throw new Error(
146146
`Cannot await or return from a thenable. ` +
147-
`You cannot await a client module from a server component.`
147+
`You cannot await a client module from a server component.`,
148148
);
149149
}
150150
// eslint-disable-next-line react-internal/safe-string-coercion

‎packages/react-server-dom-webpack/src/__tests__/ReactFlightDOM-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ describe('ReactFlightDOM', () => {
628628
Component: function () {},
629629
})
630630
async function read() {
631-
return await ClientModule.Component;
631+
return await ClientModule.then(mod => mod.Component);
632632
}
633633
expect(read).toThrowError(
634634
`Cannot await or return from a thenable. ` +

‎packages/react-server/src/ReactFlightServerTemporaryReferences.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const proxyHandlers = {
7070
case 'then':
7171
throw new Error(
7272
`Cannot await or return from a thenable. ` +
73-
`You cannot await a temporary client module from a server component.`
73+
`You cannot await a temporary client module from a server component.`,
7474
);
7575
}
7676
throw new Error(

0 commit comments

Comments
 (0)
Please sign in to comment.