mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
removed regex in if statement
Co-Authored-By: arunnattarayan <arunkumarit02@gmail.com>
This commit is contained in:
parent
06a1f30350
commit
7b80ae42e1
@ -447,7 +447,8 @@ RED.library = (function() {
|
|||||||
click: function() {
|
click: function() {
|
||||||
//TODO: move this to RED.library
|
//TODO: move this to RED.library
|
||||||
var flowName = $("#node-input-library-filename").val();
|
var flowName = $("#node-input-library-filename").val();
|
||||||
if(flowName.split(/[\\/]/).pop() === "" || /^\s*$/.test(flowName)) {
|
flowName = flowName.trim();
|
||||||
|
if(flowName === "" || flowName.endsWith("/")) {
|
||||||
RED.notify(RED._("library.invalidFilename"),"warning");
|
RED.notify(RED._("library.invalidFilename"),"warning");
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
Loading…
Reference in New Issue
Block a user