Skip to content

Commit bc2a88d

Browse files
author
F-loat
committed
fix: 修复 new Vue 解析错误
1 parent 275c32d commit bc2a88d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/mp-compiler/parse.js

+5
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ const configVisitor = {
5555
}
5656

5757
const arg = path.node.arguments[0]
58+
59+
if (!arg) {
60+
return
61+
}
62+
5863
const v = arg.type === 'Identifier' ? importsMap[arg.name] : importsMap['App']
5964
metadata.rootComponent = v || importsMap['index'] || importsMap['main']
6065
}

0 commit comments

Comments
 (0)