mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Dev fix: Fix case where trying to select row index 0
- row(0) was failing due to a logic error in the selector, which was ignoring the 0, or rather, treating it like an empty selector.
This commit is contained in:
parent
bea47e6470
commit
dd36646723
@ -238,14 +238,14 @@ var _row_selector = function ( settings, selector, opts )
|
|||||||
|
|
||||||
var rows = _row_selector_indexes( settings, opts );
|
var rows = _row_selector_indexes( settings, opts );
|
||||||
|
|
||||||
if ( ! sel ) {
|
if ( selInt !== null && $.inArray( selInt, rows ) !== -1 ) {
|
||||||
// Selector - none
|
|
||||||
return rows;
|
|
||||||
}
|
|
||||||
else if ( selInt && $.inArray( selInt, rows ) !== -1 ) {
|
|
||||||
// Selector - integer
|
// Selector - integer
|
||||||
return [ selInt ];
|
return [ selInt ];
|
||||||
}
|
}
|
||||||
|
else if ( ! sel ) {
|
||||||
|
// Selector - none
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
|
|
||||||
// Get nodes in the order from the `rows` array (can't use `pluck`) @todo - use pluck_order
|
// Get nodes in the order from the `rows` array (can't use `pluck`) @todo - use pluck_order
|
||||||
var nodes = [];
|
var nodes = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user