From bc2a88d7be4b6de221604eca24f884f3054e9d3c Mon Sep 17 00:00:00 2001 From: F-loat <945852046@qq.com> Date: Sun, 6 May 2018 13:23:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20new=20Vue=20?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mp-compiler/parse.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/mp-compiler/parse.js b/lib/mp-compiler/parse.js index 8c5901a..c15cd7e 100644 --- a/lib/mp-compiler/parse.js +++ b/lib/mp-compiler/parse.js @@ -55,6 +55,11 @@ const configVisitor = { } const arg = path.node.arguments[0] + + if (!arg) { + return + } + const v = arg.type === 'Identifier' ? importsMap[arg.name] : importsMap['App'] metadata.rootComponent = v || importsMap['index'] || importsMap['main'] }