Function node issues: Invalid Properties - noerr (Chrome) & closing editor while in Setup or Close tab

Ah good point. No it doesn't - but that's an issue with us, not ACE.

Because the code you put inside the Function node is actually the body of an async function, before we pass it up to ACE to validate, we wrap it in a function:

So when you have the following in the edit box:

if( msg.topic === 'start' ) {
    node.warn('starting...');

return msg;

We actually pass this to ACE to validate:

async function __nodered__(msg) {
   if( msg.topic === 'start' ) {
       node.warn('starting...');

   return msg;
}

This stops it warning if you use await in your function code.

However, it means in the case you've highlighted, it considers the bracket for the if statement to have a closing bracket (the one we add), and the bracket that isn't closed is actually on the first line. That puts the warning on the first line and we hide it because it's out of range of your code.

That doesn't stop the count of errors to be correct (noerrs === number of errors) - which is why the node is (correctly) marked as invalid, despite nothing showing in the edit dialog.

So need to be a bit smarter about handling errors that get flagged on the first (added) line.