1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Dev fix: Update filter formatters to deal with null / undefined data

This commit is contained in:
Allan Jardine 2013-08-05 15:40:50 +01:00
parent 38e12beac9
commit 6447373eb6
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1 @@
e171e7b3e698822231f23b73dec77fea2320a227
da2fd7496f9b3af515df83a26c61c05d9451ae42

View File

@ -13656,13 +13656,15 @@
$.extend( DataTable.ext.type.filter, {
html: function ( data ) {
return data
.replace( __filter_lines, " " )
.replace( __filter_html, "" );
return typeof data === 'string' ?
data
.replace( __filter_lines, " " )
.replace( __filter_html, "" ) :
'';
},
string: function ( data ) {
return data.replace ?
return typeof data === 'string' ?
data.replace( __filter_lines, " " ) :
data;
}