mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Enquote undefineds.
This commit is contained in:
@@ -1053,7 +1053,7 @@ namespace ts {
|
||||
errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, extraKeyDiagnosticMessage, keyText));
|
||||
}
|
||||
const value = convertPropertyValueToJson(element.initializer, option);
|
||||
if (typeof keyText !== undefined && typeof value !== undefined) {
|
||||
if (typeof keyText !== "undefined" && typeof value !== "undefined") {
|
||||
result[keyText] = value;
|
||||
// Notify key value set, if user asked for it
|
||||
if (jsonConversionNotifier &&
|
||||
|
||||
Reference in New Issue
Block a user