Skip to content

Commit 787b8d4

Browse files
committed
Remove runtime error highlight after changing file content
1 parent 8c490c9 commit 787b8d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

client/modules/IDE/components/Editor.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@ class Editor extends React.Component {
247247
);
248248
}
249249

250-
if (this.props.consoleEvents.length !== prevProps.consoleEvents.length) {
251-
if (this.props.runtimeErrorWarningVisible) {
252-
// todo here, need to select the right file
253-
250+
if (this.props.runtimeErrorWarningVisible) {
251+
if (this.props.consoleEvents.length !== prevProps.consoleEvents.length) {
254252
this.props.consoleEvents.forEach((consoleEvent) => {
255253
if (consoleEvent.method === 'error') {
254+
// It doesn't work if you create a new Error, but this works
255+
// LOL
256256
const errorObj = { stack: consoleEvent.data[0] };
257257
StackTrace.fromError(errorObj).then((stackLines) => {
258258
this.props.expandConsole();

0 commit comments

Comments
 (0)