mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: prevent js error if sortList targets incorrect column. Fixes #908
This commit is contained in:
parent
6e2750bc83
commit
65d48727ff
@ -639,9 +639,10 @@
|
||||
val = sortList[indx];
|
||||
// ensure all sortList values are numeric - fixes #127
|
||||
col = parseInt(val[0], 10);
|
||||
// make sure header exists
|
||||
header = c.$headerIndexed[col][0];
|
||||
if (header) { // prevents error if sorton array is wrong
|
||||
// prevents error if sorton array is wrong
|
||||
if ( col < c.columns && c.$headerIndexed[col] ) {
|
||||
// make sure header exists
|
||||
header = c.$headerIndexed[col][0];
|
||||
// o.count = o.count + 1;
|
||||
dir = ('' + val[1]).match(/^(1|d|s|o|n)/);
|
||||
dir = dir ? dir[0] : '';
|
||||
|
Loading…
Reference in New Issue
Block a user