fix bounds check - jscancer - Javascript crap (relatively small)
(HTM) git clone git://git.codemadness.org/jscancer
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 94747bfaa39f95e6aeb09a31550a6433f38ed35b
(DIR) parent 6373051632540cfb70faf8c988faa798cabcfb70
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 3 Aug 2017 19:02:24 +0200
fix bounds check
the (outer) size of values and filtervalues happen to be always the same.
Diffstat:
M datatable/datatable.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/datatable/datatable.js b/datatable/datatable.js
@@ -239,7 +239,7 @@ function datatable_filter(d, data, s) {
var fc = 0;
for (var k = 0; k < tok.length && fc < tok.length; k++) {
var f = false;
- for (var j = 0; j < data[i].values.length && fc < tok.length && !f; j++)
+ for (var j = 0; j < data[i].filtervalues.length && fc < tok.length && !f; j++)
for (var l = 0; l < data[i].filtervalues[j].length && !f &&
d.cols[j].filterable; l++)
if (data[i].filtervalues[j][l].indexOf(tok[k]) != -1)