1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

View File

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