Skip to content

Commit c7b5e47

Browse files
committed
Expand console on runtime errors
1 parent d1b3f12 commit c7b5e47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/modules/IDE/components/Editor.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ class Editor extends React.Component {
267267
.split('\n')[1]
268268
.split('at ')[1];
269269
} else {
270+
this.props.expandConsole();
270271
return;
271272
}
272273
const [source, line] = sourceAndLoc.split(':');
@@ -279,6 +280,7 @@ class Editor extends React.Component {
279280
(f) => f.name === fileName && f.filePath === filePath
280281
);
281282
this.props.setSelectedFile(fileWithError.id);
283+
this.props.expandConsole();
282284
const lineNumber = parseInt(line, 10) - 1;
283285
this._cm.addLineClass(
284286
lineNumber,
@@ -494,7 +496,8 @@ Editor.propTypes = {
494496
runtimeErrorWarningVisible: PropTypes.bool.isRequired,
495497
provideController: PropTypes.func.isRequired,
496498
t: PropTypes.func.isRequired,
497-
setSelectedFile: PropTypes.func.isRequired
499+
setSelectedFile: PropTypes.func.isRequired,
500+
expandConsole: PropTypes.func.isRequired
498501
};
499502

500503
function mapStateToProps(state) {

0 commit comments

Comments
 (0)