diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index b3f9fade..6b0832e5 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -324,6 +324,7 @@ class PreviewFrame extends React.Component { } renderSketch() { + this.props.clearConsole(); const doc = this.iframeElement; const localFiles = this.injectLocalFiles(); if (this.props.isPlaying) { @@ -378,7 +379,8 @@ PreviewFrame.propTypes = { fullView: PropTypes.bool, setBlobUrl: PropTypes.func.isRequired, stopSketch: PropTypes.func.isRequired, - expandConsole: PropTypes.func.isRequired + expandConsole: PropTypes.func.isRequired, + clearConsole: PropTypes.func.isRequired, }; PreviewFrame.defaultProps = { diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index 5967c9e3..ba8ed8c4 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -344,6 +344,7 @@ class IDEView extends React.Component { stopSketch={this.props.stopSketch} setBlobUrl={this.props.setBlobUrl} expandConsole={this.props.expandConsole} + clearConsole={this.props.clearConsole} />