diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index d43ae7c61..ce18aa689 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -68,7 +68,10 @@ const Editor = createClass({ }, handleInject : function(injectText){ - const text = (this.isText() ? this.props.brew.text : this.props.brew.style); + const text = ( + this.isText() && this.props.brew.text || + this.isStyle() && (this.props.brew.style || DEFAULT_STYLE_TEXT) + ); const lines = text.split('\n'); const cursorPos = this.refs.codeEditor.getCursorPosition();