report error if module name is empty

This commit is contained in:
Vladimir Matveev
2015-09-14 14:33:35 -07:00
parent 90273f995d
commit 5636655cf4
4 changed files with 33 additions and 1 deletions

View File

@@ -965,7 +965,7 @@ namespace ts {
// Escape the name in the "require(...)" clause to ensure we find the right symbol.
let moduleName = escapeIdentifier(moduleReferenceLiteral.text);
if (!moduleName) {
if (moduleName === undefined) {
return;
}
let isRelative = isExternalModuleNameRelative(moduleName);