mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Added validation while export into library
This commit is contained in:
parent
2f93bb969b
commit
06a1f30350
@ -447,7 +447,9 @@ RED.library = (function() {
|
||||
click: function() {
|
||||
//TODO: move this to RED.library
|
||||
var flowName = $("#node-input-library-filename").val();
|
||||
if (!/^\s*$/.test(flowName)) {
|
||||
if(flowName.split(/[\\/]/).pop() === "" || /^\s*$/.test(flowName)) {
|
||||
RED.notify(RED._("library.invalidFilename"),"warning");
|
||||
} else {
|
||||
$.ajax({
|
||||
url:'library/flows/'+flowName,
|
||||
type: "POST",
|
||||
|
Loading…
Reference in New Issue
Block a user