mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Update router to allow async functions
This commit is contained in:
parent
7d3afb0502
commit
869fdc2c25
@ -44,7 +44,11 @@ const defaultTransition = <%=
|
||||
%>
|
||||
|
||||
async function createApp (ssrContext) {
|
||||
const router = createRouter(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