File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/start/src/server Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,10 @@ async function fetchServerFunction(
5959 if ( response . body ) {
6060 /* @ts -ignore-next-line */
6161 response . customBody = ( ) => {
62- // TODO check for serialization mode
63- return deserializeJSStream ( instance , response ) ;
62+ if ( import . meta. env . SEROVAL_MODE === "js" ) {
63+ return deserializeJSStream ( instance , response ) ;
64+ }
65+ return deserializeJSONStream ( response ) ;
6466 } ;
6567 }
6668 return response ;
@@ -73,7 +75,6 @@ async function fetchServerFunction(
7375 } else if ( contentType && contentType . startsWith ( "application/json" ) ) {
7476 result = await response . json ( ) ;
7577 } else if ( import . meta. env . SEROVAL_MODE === "js" ) {
76- // TODO check for serialization mode
7778 result = await deserializeJSStream ( instance , response ) ;
7879 } else {
7980 result = await deserializeJSONStream ( response ) ;
You can’t perform that action at this time.
0 commit comments