From 869fdc2c254b7b1781e9575b6b30bf61ea46bffb Mon Sep 17 00:00:00 2001 From: Jordan Ramstad Date: Fri, 13 Apr 2018 12:22:35 -0600 Subject: [PATCH] Update router to allow async functions --- lib/app/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/app/index.js b/lib/app/index.js index 7ba2b65132..fe30f2e479 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -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)