From 90761fd840b8438c9b5d832713eea8fcf0c48fc1 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 13 May 2021 17:23:25 +0100 Subject: [PATCH] Fix 'SyntaxError' in Function node when last line of on-stop is a comment --- .../node_modules/@node-red/nodes/core/function/10-function.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/function/10-function.js b/packages/node_modules/@node-red/nodes/core/function/10-function.js index 17e6e569a..1b3dc3ba9 100644 --- a/packages/node_modules/@node-red/nodes/core/function/10-function.js +++ b/packages/node_modules/@node-red/nodes/core/function/10-function.js @@ -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"); }; -