From acbc4859c0e6704aa1c7b63c5cdd5a6d1f07444f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 5 Jun 2015 09:53:59 +0100 Subject: [PATCH] only remove ClassProperty in flow transformer when it has no value --- src/babel/transformation/transformers/other/flow.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/babel/transformation/transformers/other/flow.js b/src/babel/transformation/transformers/other/flow.js index 54336d640c..1a06f4196e 100644 --- a/src/babel/transformation/transformers/other/flow.js +++ b/src/babel/transformation/transformers/other/flow.js @@ -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) {