mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
refactor: make createRouter support async
This commit is contained in:
parent
869fdc2c25
commit
918ce3c15f
@ -44,11 +44,7 @@ const defaultTransition = <%=
|
||||
%>
|
||||
|
||||
async function createApp (ssrContext) {
|
||||
if (createRouter.constructor.name === 'AsyncFunction') {
|
||||
const router = await createRouter(ssrContext)
|
||||
} else {
|
||||
const router = createRouter(ssrContext)
|
||||
}
|
||||
|
||||
<% if (store) { %>
|
||||
const store = createStore(ssrContext)
|
||||
|
Loading…
Reference in New Issue
Block a user