do not emit '=' in jsx attribute if initializer is missing

This commit is contained in:
Vladimir Matveev
2015-09-08 18:40:30 -07:00
parent 96a815878c
commit ee56e60ca0
9 changed files with 42 additions and 11 deletions

View File

@@ -1292,8 +1292,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
function jsxEmitPreserve(node: JsxElement|JsxSelfClosingElement) {
function emitJsxAttribute(node: JsxAttribute) {
emit(node.name);
write("=");
emit(node.initializer);
if (node.initializer) {
write("=");
emit(node.initializer);
}
}
function emitJsxSpreadAttribute(node: JsxSpreadAttribute) {