Skip to content

Commit

Permalink
Merge pull request vitmalina#1106 from ceedriic/searchData
Browse files Browse the repository at this point in the history
w2grid.js: protect against null pointer
  • Loading branch information
vitmalina committed Nov 16, 2015
2 parents ebb42c8 + 1c8fe96 commit fa61b7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/w2grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4033,7 +4033,7 @@
for (var s = 0; s < obj.searchData.length; s++) {
var sdata = obj.searchData[s];
var fld = obj.getSearch(sdata.field);
if (fld.hidden) continue;
if (!fld || fld.hidden) continue;
if (str.indexOf(sdata.value) == -1) str.push(sdata.value);
}
if (str.length > 0) $(obj.box).find('.w2ui-grid-data > div').w2marker(str);
Expand Down Expand Up @@ -6240,7 +6240,7 @@
for (var s = 0; s < obj.searchData.length; s++) {
var sdata = obj.searchData[s];
var fld = obj.getSearch(sdata.field);
if (fld.hidden) continue;
if (!fld || fld.hidden) continue;
if (str.indexOf(sdata.value) == -1) str.push(sdata.value);
}
if (str.length > 0) $(obj.box).find('.w2ui-grid-data > div').w2marker(str);
Expand Down

0 comments on commit fa61b7e

Please sign in to comment.