Update router to allow async functions

This commit is contained in:
Jordan Ramstad 2018-04-13 12:22:35 -06:00 committed by GitHub
parent 7d3afb0502
commit 869fdc2c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,11 @@ 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)