From d5bd0a3702939b3266db196e2274d7cb3124319d Mon Sep 17 00:00:00 2001 From: Wing Gao Date: Wed, 15 Aug 2018 19:44:31 +0800 Subject: [PATCH] =?UTF-8?q?[TS]=20=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=8E=A5impo?= =?UTF-8?q?rt=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mp-compiler/parse-ts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mp-compiler/parse-ts.js b/lib/mp-compiler/parse-ts.js index 44acaf4..8b42334 100644 --- a/lib/mp-compiler/parse-ts.js +++ b/lib/mp-compiler/parse-ts.js @@ -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')