Skip to content

Commit

Permalink
fix: don't modify state directly (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhashimotoo authored Apr 28, 2020
1 parent 26bb3e4 commit f31a4e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/editors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ export class Editors extends React.Component<EditorsProps, EditorsState> {
}

if (!this.state || !this.state.isMounted) {
this.state = {
this.setState({
monaco,
monacoOptions: defaultMonacoOptions
};
});
} else {
this.setState({ monaco });
}
Expand Down

0 comments on commit f31a4e3

Please sign in to comment.