Skip to content

Commit 2ae6d70

Browse files
committed
wip
1 parent 8159896 commit 2ae6d70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/unambiguous.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ const unambiguousNodeType = /^(?:(?:Exp|Imp)ort.*Declaration|TSExportAssignment)
2525
* @return {Boolean}
2626
*/
2727
exports.isModule = function isUnambiguousModule(ast) {
28-
return ast.body.some(node => unambiguousNodeType.test(node.type))
28+
return ast.body && ast.body.some(node => unambiguousNodeType.test(node.type))
2929
}

0 commit comments

Comments
 (0)