mirror of https://github.com/alibaba/ice.git
				
				
				
			fix: fail to render document when csr (#428)
* fix: fail to render document when csr * chore: merge release-next * chore: line break
This commit is contained in:
		
							parent
							
								
									1d71d83e51
								
							
						
					
					
						commit
						26f8bf7b67
					
				|  | @ -160,11 +160,12 @@ async function doRender(serverContext: ServerContext, renderOptions: RenderOptio | |||
|   } | ||||
| 
 | ||||
|   const routePath = getCurrentRoutePath(matches); | ||||
|   const routeModules = await loadRouteModules(matches.map(({ route: { id, load } }) => ({ id, load }))); | ||||
| 
 | ||||
|   if (documentOnly) { | ||||
|     return renderDocument({ matches, routePath, renderOptions, routeModules }); | ||||
|     return renderDocument({ matches, routePath, renderOptions, routeModules: {} }); | ||||
|   } | ||||
|   // FIXME: https://github.com/ice-lab/ice-next/issues/427
 | ||||
|   const routeModules = await loadRouteModules(matches.map(({ route: { id, load } }) => ({ id, load }))); | ||||
| 
 | ||||
|   try { | ||||
|     return await renderServerEntry({ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue