File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/server-renderer/src Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -96,13 +96,10 @@ export function renderComponentVNode(
9696 const hasAsyncSetup = isPromise ( res )
9797 let prefetches = instance . sp /* LifecycleHooks.SERVER_PREFETCH */
9898 if ( hasAsyncSetup || prefetches ) {
99- let p : Promise < unknown > = (
100- hasAsyncSetup
101- ? // instance.sp may be null until an async setup resolves, so evaluate it here
102- ( res as Promise < void > ) . then ( ( ) => ( prefetches = instance . sp ) )
103- : Promise . resolve ( )
104- )
99+ const p : Promise < unknown > = Promise . resolve ( res as Promise < void > )
105100 . then ( ( ) => {
101+ // instance.sp may be null until an async setup resolves, so evaluate it here
102+ prefetches = instance . sp
106103 if ( prefetches ) {
107104 return Promise . all (
108105 prefetches . map ( prefetch => prefetch . call ( instance . proxy ) ) ,
You can’t perform that action at this time.
0 commit comments