From 052302b3e76e1b7bd02d6c1849a22ccc8aae2a27 Mon Sep 17 00:00:00 2001 From: dceejay Date: Thu, 7 May 2015 22:02:46 +0100 Subject: [PATCH] actually set valid to be false in function so .toString will work... --- nodes/core/core/80-function.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nodes/core/core/80-function.html b/nodes/core/core/80-function.html index 5c1cc4df3..91a5afee2 100644 --- a/nodes/core/core/80-function.html +++ b/nodes/core/core/80-function.html @@ -98,7 +98,7 @@ height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom"))); $(".node-text-editor").css("height",height+"px"); that.editor.resize(); - }; + } $( "#dialog" ).on("dialogresize", functionDialogResize); $( "#dialog" ).one("dialogopen", function(ev) { var size = $( "#dialog" ).dialog('option','sizeCache-function'); @@ -118,7 +118,7 @@ mode: 'ace/mode/javascript', value: $("#node-input-func").val() }); - + RED.library.create({ url:"functions", // where to get the data from type:"function", // the type of object the library is for @@ -134,8 +134,8 @@ for (var k=0; k < annot.length; k++) { //console.log(annot[k].type,":",annot[k].text, "on line", annot[k].row); if (annot[k].type === "error") { - $("#node-input-valid").val(null); - delete this.valid; + $("#node-input-valid").val(false); + this.valid = false; } } $("#node-input-func").val(this.editor.getValue());