diff options
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/script.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/public/js/script.js b/public/js/script.js index ea86931..50496d3 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -15,7 +15,11 @@ } function csv_to_array(val) { - return val.split(/[, ]+/); + if(val.length > 0) { + return val.split(/[, ]+/); + } else { + return []; + } } |