From 41dd921b414aa18c3e35c7fd5b5038a2181ce972 Mon Sep 17 00:00:00 2001 From: Mottie Date: Thu, 21 Feb 2013 12:08:20 -0600 Subject: [PATCH] Don't include empty cells in the filter select --- js/jquery.tablesorter.widgets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 611974eb..679304f5 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -498,8 +498,8 @@ $.tablesorter.addWidget({ // build option list for (k = 0; k < arry.length; k++){ - // replace quotes - fixes #242 - o += ''; + // replace quotes - fixes #242 & ignore empty strings - see http://stackoverflow.com/q/14990971/145346 + o += arry[k] !== '' ? '' : ''; } $t.find('thead').find('select.' + css + '[data-column="' + i + '"]')[ updating ? 'html' : 'append' ](o); },