addressed PR feedback, added more tests

This commit is contained in:
Vladimir Matveev
2015-08-05 10:36:47 -07:00
parent c2fe8428a9
commit fd46d205f9
9 changed files with 317 additions and 22 deletions

View File

@@ -2070,7 +2070,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
else {
// check if constant enum value is integer
let constantValue = tryGetConstEnumValue(node.expression);
shouldEmitSpace = constantValue !== undefined && isFinite(constantValue) && Math.floor(constantValue) === constantValue;
// isFinite handles cases when constantValue is undefined
shouldEmitSpace = isFinite(constantValue) && Math.floor(constantValue) === constantValue;
}
}