From a1cd362780e27b8a9f325e19d5d3dd5068f611ed Mon Sep 17 00:00:00 2001 From: amitch6097 Date: Sat, 4 Jan 2020 23:24:08 -0500 Subject: [PATCH] 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. --- client/modules/IDE/components/PreviewFrame.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 45fa00fd..ef19c96d 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -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();