Skip to content

Commit a1cd362

Browse files
amitch6097amitch6097
amitch6097
authored and
amitch6097
committed
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.
1 parent 3357af6 commit a1cd362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/modules/IDE/components/PreviewFrame.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ class PreviewFrame extends React.Component {
334334
}
335335

336336
renderSketch() {
337-
this.props.clearConsole();
338337
const doc = this.iframeElement;
339338
const localFiles = this.injectLocalFiles();
340339
if (this.props.isPlaying) {
340+
this.props.clearConsole();
341341
srcDoc.set(doc, localFiles);
342342
if (this.props.endSketchRefresh) {
343343
this.props.endSketchRefresh();

0 commit comments

Comments
 (0)