From c6264e80407021a45baaedff4c2f44d233b716ac Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 22 Dec 2013 22:22:47 +0000 Subject: [PATCH] Add newline when wrapping function to allow comments Fixes #122 --- nodes/core/core/80-function.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/core/80-function.js b/nodes/core/core/80-function.js index 2766dc49b..c02af92fa 100644 --- a/nodes/core/core/80-function.js +++ b/nodes/core/core/80-function.js @@ -25,7 +25,7 @@ function FunctionNode(n) { RED.nodes.createNode(this,n); this.name = n.name; this.func = n.func; - var functionText = "var results = (function(msg){"+this.func+"})(msg);"; + var functionText = "var results = (function(msg){"+this.func+"\n})(msg);"; this.topic = n.topic; this.context = {global:RED.settings.functionGlobalContext || {}}; try {