fix function node error badge not shown

fixes #4194
This commit is contained in:
Steve-Mcl 2023-05-26 10:12:48 +01:00
parent 3a9f38a873
commit 59ec87a393
1 changed files with 11 additions and 11 deletions

View File

@ -1168,19 +1168,19 @@ RED.editor.codeEditor.monaco = (function() {
// Warning: 4
// Error: 8
ed.getAnnotations = function getAnnotations() {
var aceCompatibleMarkers = [];
let aceCompatibleMarkers;
try {
var _model = ed.getModel();
const _model = ed.getModel();
if (_model !== null) {
var id = _model._languageId; // e.g. javascript
var ra = _model._associatedResource.authority; //e.g. model
var rp = _model._associatedResource.path; //e.g. /18
var rs = _model._associatedResource.scheme; //e.g. inmemory
var modelMarkers = monaco.editor.getModelMarkers(_model) || [];
var thisEditorsMarkers = modelMarkers.filter(function (marker) {
var _ra = marker.resource.authority; //e.g. model
var _rp = marker.resource.path; //e.g. /18
var _rs = marker.resource.scheme; //e.g. inmemory
const id = _model.getLanguageId(); // e.g. javascript
const ra = _model.uri.authority; // e.g. model
const rp = _model.uri.path; // e.g. /18
const rs = _model.uri.scheme; // e.g. inmemory
const modelMarkers = monaco.editor.getModelMarkers(_model) || [];
const thisEditorsMarkers = modelMarkers.filter(function (marker) {
const _ra = marker.resource.authority; // e.g. model
const _rp = marker.resource.path; // e.g. /18
const _rs = marker.resource.scheme; // e.g. inmemory
return marker.owner == id && _ra === ra && _rp === rp && _rs === rs;
})
aceCompatibleMarkers = thisEditorsMarkers.map(function (marker) {