Skip to content

Commit f7ea7f8

Browse files
committed
Fixed initialization problem if alphabet search plug-in is not enabled for a table
1 parent 3f644a4 commit f7ea7f8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

js/dataTables.alphabetSearch.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! AlphabetSearch for DataTables v1.1.2
1+
/*! AlphabetSearch for DataTables v1.1.3
22
* 2014 SpryMedia Ltd - datatables.net/license
33
* Gyrocode - MIT License
44
*/
@@ -49,6 +49,11 @@ $.fn.dataTable.Api.register( 'alphabetSearch.recalc()', function ( searchTerm )
4949

5050
// Search plug-in
5151
$.fn.dataTable.ext.search.push( function ( context, searchData ) {
52+
// Ensure that table has alphabet search feature enabled
53+
if ( ! context.hasOwnProperty('alphabetSearch') ) {
54+
return true;
55+
}
56+
5257
// Ensure that there is a search applied to this table before running it
5358
if ( ! context.alphabetSearch.letterSearch ) {
5459
return true;

js/dataTables.alphabetSearch.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)