Skip to content

Commit

Permalink
Don't clear error until DOT parsing succeeds
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
magjac committed Sep 11, 2018
1 parent 29b45c6 commit dd9ad28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions src/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class Graph extends React.Component {
this.prevEngine = this.props.engine;
try {
this.prelDotGraph = new DotGraph(this.props.dotSrc);
this.props.onError(null);
}
catch(error) {
let {location: {start: {line}}, message} = error;
Expand Down
3 changes: 0 additions & 3 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ class Index extends React.Component {
}

handleTextChange = (text) => {
this.setState({
error: null,
});
this.setPersistentState({
dotSrc: text
});
Expand Down

0 comments on commit dd9ad28

Please sign in to comment.