From 3b0fc853fbfbc6c910e2649409c54360135e274c Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Mon, 23 Feb 2015 09:34:27 -0800 Subject: [PATCH] fix(composer): fix bug where message body says undefined --- .../composer/lib/contenteditable-component.cjsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal_packages/composer/lib/contenteditable-component.cjsx b/internal_packages/composer/lib/contenteditable-component.cjsx index f31c460cc..7e411ddfa 100644 --- a/internal_packages/composer/lib/contenteditable-component.cjsx +++ b/internal_packages/composer/lib/contenteditable-component.cjsx @@ -105,5 +105,8 @@ ContenteditableComponent = React.createClass @props.html else quoteStart = @_htmlQuotedTextStart() - @props.html.substr(0, quoteStart) unless quoteStart is -1 + if quoteStart is -1 + return @props.html + else + return @props.html.substr(0, quoteStart)