Fix 'SyntaxError' in Function node when last line of on-stop is a comment

This commit is contained in:
Nick O'Leary 2021-05-13 17:23:25 +01:00
parent d7dc7c4eda
commit 90761fd840
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 2 additions and 2 deletions

View File

@ -366,7 +366,8 @@ module.exports = function(RED) {
__node__.error("Cannot send from close function");
}
};
`+node.fin +`})();`;
`+node.fin +`
})();`;
finOpt = createVMOpt(node, " cleanup");
finScript = new vm.Script(finText, finOpt);
}
@ -489,4 +490,3 @@ module.exports = function(RED) {
});
RED.library.register("functions");
};