1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-02-17 15:54:14 +01:00

Fix: Selector couldn't be given as an API instance with indexes

- It is useful to be able to filter row indexes by a condition and then
  operate on the resulting array of indexes, but before the selector
  would only itterate over real arrays. So if you passed is an API
  instance with the result set being the indexes to delete, it wouldn't
  work!

- Fix is to loop over anything which has a `length` property

- Thread 20572
This commit is contained in:
Allan Jardine 2014-04-22 09:58:13 +01:00
parent d6a5b7c729
commit 7ab49af0b6
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
7af052b65bad5f70edd2aa928eab03ce43206081
d9f416232bb33d53cc9a6f006416bf19c385ebe4

View File

@ -7290,7 +7290,7 @@
out = [], res,
a, i, ien, j, jen;
if ( ! $.isArray( selector ) ) {
if ( ! selector || selector.length === undefined ) {
selector = [ selector ];
}