only remove ClassProperty in flow transformer when it has no value

This commit is contained in:
Sebastian McKenzie 2015-06-05 09:53:59 +01:00
parent 55750e05e7
commit acbc4859c0

View File

@ -7,9 +7,8 @@ export function Flow(node) {
}
export function ClassProperty(node) {
// todo: uncomment when/if class properties are supported by default.
// node.typeAnnotation = null;
this.dangerouslyRemove();
node.typeAnnotation = null;
if (!node.value) this.dangerouslyRemove();
}
export function Class(node) {