Bug 15832: Remove empty string from the filters

On each cell, the split will generate a new empty entry.
This patch removes that entry.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
(cherry picked from commit 1931ff4653)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Jonathan Druart 2016-04-05 07:40:21 +01:00 committed by Julian Maurice
parent 4f699275a7
commit ef6c60d8cc
1 changed files with 1 additions and 2 deletions

View File

@ -29,8 +29,7 @@ $(document).ready(function() {
var split_array = cD[j].split(/<br>/gi);
for ( k=0 ; k<split_array.length ; k++ ){
var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
var check_array = $.inArray(str, new_array);
if (check_array == -1) {
if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
new_array.push(str);
}
}