mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
addressed PR feedback, added more tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user