0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 16:52:38 +00:00

Make sure initial tab loads with language for code highlighting

This commit is contained in:
Trevor Buckner
2021-10-24 18:03:10 -04:00
parent 47b99a24fb
commit ddb12ffbe2

View File

@@ -33,8 +33,8 @@ const CodeEditor = createClass({
componentDidMount : function() { componentDidMount : function() {
this.buildEditor(); this.buildEditor();
this.codeMirror.setValue(this.props.value); const newDoc = CodeMirror.Doc(this.props.value, this.props.language);
this.codeMirror.clearHistory(); this.codeMirror.swapDoc(newDoc);
}, },
componentDidUpdate : function(prevProps) { componentDidUpdate : function(prevProps) {