Fix emit for boolean attributes

This commit is contained in:
Ryan Cavanaugh
2015-06-18 18:37:32 -07:00
parent 46eb5216ff
commit b0750c25b2
5 changed files with 25 additions and 16 deletions

View File

@@ -1148,7 +1148,12 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
function emitJsxAttribute(node: JsxAttribute) {
emitAttributeName(node.name);
write(': ');
emit(node.initializer);
if (node.initializer) {
emit(node.initializer);
}
else {
write('true');
}
}
function emitJsxElement(openingNode: JsxOpeningElement|JsxSelfClosingElement, children?: JsxChild[]) {