From 7ab49af0b65136f609cd83ec681a41da29ca6350 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 22 Apr 2014 09:58:13 +0100 Subject: [PATCH] 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 --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 46ae20a9..123bca5d 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -7af052b65bad5f70edd2aa928eab03ce43206081 +d9f416232bb33d53cc9a6f006416bf19c385ebe4 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index d6a68052..60afc62a 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -7290,7 +7290,7 @@ out = [], res, a, i, ien, j, jen; - if ( ! $.isArray( selector ) ) { + if ( ! selector || selector.length === undefined ) { selector = [ selector ]; }