From 918ce3c15f9f7ce8b8209fef44988b7eba6b2c21 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Tue, 17 Apr 2018 15:09:50 +0800 Subject: [PATCH] refactor: make createRouter support async --- lib/app/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/app/index.js b/lib/app/index.js index fe30f2e479..8461b512ce 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -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) - } + const router = await createRouter(ssrContext) <% if (store) { %> const store = createStore(ssrContext)