Fix p5 console being cleared on pause
The p5 console was being cleared on pause not allowing a user to view what was outputed on the last run. To fix clearConsole function is now only called if playing.
This commit is contained in:
parent
f3e8b81cb7
commit
b02eef0a88
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue