Fix p5 console being cleared on pause
This commit is contained in:
Cassie Tarakajian 2020-01-09 13:37:51 -05:00 committed by GitHub
commit ec7c2d1ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -334,10 +334,10 @@ class PreviewFrame extends React.Component {
}
renderSketch() {
this.props.clearConsole();
const doc = this.iframeElement;
const localFiles = this.injectLocalFiles();
if (this.props.isPlaying) {
this.props.clearConsole();
srcDoc.set(doc, localFiles);
if (this.props.endSketchRefresh) {
this.props.endSketchRefresh();