Skip to content

Commit 27df71d

Browse files
committed
fix the transformer
1 parent 656e216 commit 27df71d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/exp/ts-transform-import-path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function visitNodeAndChildren(node, context) {
4646

4747
function visitNode(node) {
4848
let importPath;
49-
if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {
49+
if ((ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) && node.moduleSpecifier) {
5050
const importPathWithQuotes = node.moduleSpecifier.getText();
5151
importPath = importPathWithQuotes.substr(
5252
1,

0 commit comments

Comments
 (0)