From 8a15e9bd54e1c127a04df1b4d01416430442f6a9 Mon Sep 17 00:00:00 2001 From: WhatAKitty <104xuqiang@163.com> Date: Fri, 29 Dec 2017 11:04:36 +0800 Subject: [PATCH] fix error while using react-script (#516) --- src/common/router.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/router.js b/src/common/router.js index a2305f5f..3eac195d 100644 --- a/src/common/router.js +++ b/src/common/router.js @@ -11,7 +11,8 @@ const dynamicWrapper = (app, models, component) => dynamic({ component: () => { const p = component(); return new Promise((resolve, reject) => { - p.then((Comp) => { + p.then((raw) => { + const Comp = raw.default || raw; resolve(props => ); }).catch(err => reject(err)); }); -- GitLab