From 93e0ec2a73a1bac471db6c968c5aa6dfa5e4026e Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Fri, 17 Feb 2017 16:04:47 -0500 Subject: [PATCH] fix #284, when autorefresh is enabled, clear the console as well --- client/modules/IDE/components/Editor.jsx | 4 +++- client/modules/IDE/pages/IDEView.jsx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 6fd6ad12..0117172c 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -84,6 +84,7 @@ class Editor extends React.Component { this.props.updateFileContent(this.props.file.name, this._cm.getValue()); if (this.props.autorefresh && this.props.isPlaying) { this.props.startRefreshSketch(); + this.props.clearConsole(); } }, 400)); @@ -296,7 +297,8 @@ Editor.propTypes = { isExpanded: PropTypes.bool.isRequired, collapseSidebar: PropTypes.func.isRequired, expandSidebar: PropTypes.func.isRequired, - isUserOwner: PropTypes.bool + isUserOwner: PropTypes.bool, + clearConsole: PropTypes.func.isRequired }; export default Editor; diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index d4c2d757..ed8c12c2 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -313,6 +313,7 @@ class IDEView extends React.Component { expandSidebar={this.props.expandSidebar} collapseSidebar={this.props.collapseSidebar} isUserOwner={this.isUserOwner()} + clearConsole={this.props.clearConsole} />