mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-28 09:10:17 +02:00
fix showError code for monaco
This commit is contained in:
@@ -173,15 +173,7 @@ export default class ContentWrap extends Component {
|
||||
}
|
||||
|
||||
showErrors(lang, errors) {
|
||||
var editor = this.cm[lang];
|
||||
errors.forEach(function(e) {
|
||||
editor.operation(function() {
|
||||
var n = document.createElement('div');
|
||||
n.setAttribute('data-title', e.message);
|
||||
n.classList.add('gutter-error-marker');
|
||||
editor.setGutterMarker(e.lineNumber, 'error-gutter', n);
|
||||
});
|
||||
});
|
||||
this.cm[lang].showErrors(errors);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user