Skip to content

Commit

Permalink
Merge pull request #42 from WingGao/develop
Browse files Browse the repository at this point in the history
[TS] 修复直接import报错
  • Loading branch information
anchengjian authored Aug 16, 2018
2 parents a5c40f6 + d5bd0a3 commit d7f7806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mp-compiler/parse-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function delint (sourceFile) {
switch (node.kind) {
case ts.SyntaxKind.ImportDeclaration:
// 只处理 import Comp from 'xxx.vue'
if (node.importClause.name) {
if (node.importClause && node.importClause.name) {
importsMap[node.importClause.name.escapedText] = node.moduleSpecifier.text
}
// report(node, 'import')
Expand Down

0 comments on commit d7f7806

Please sign in to comment.