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

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

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");
};