Fix bug with deleting all code

This commit is contained in:
emizzle 2018-08-28 00:22:14 +10:00 committed by Pascal Precht
parent e027ae258a
commit 38032e1ef2
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class FiddleContainer extends Component {
} }
componentDidUpdate(prevProps){ componentDidUpdate(prevProps){
if(prevProps.lastFiddle !== this.props.lastFiddle){ if(this.props.lastFiddle && (prevProps.lastFiddle !== this.props.lastFiddle)){
this._onCodeChange(this.props.lastFiddle); this._onCodeChange(this.props.lastFiddle);
} }
} }