0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +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() {
this.buildEditor();
this.codeMirror.setValue(this.props.value);
this.codeMirror.clearHistory();
const newDoc = CodeMirror.Doc(this.props.value, this.props.language);
this.codeMirror.swapDoc(newDoc);
},
componentDidUpdate : function(prevProps) {