Skip to content

Commit 485b259

Browse files
committedApr 29, 2015
Fix: $.map() expects an array, but a string could be passed in during smart search, which could cause an error with the latest jQuery libraries
This fixes DataTables/DataTables #546
1 parent 427137f commit 485b259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎js/core/core.filter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ function _fnFilterCreateSearch( search, regex, smart, caseInsensitive )
279279
*
280280
* ^(?=.*?\bone\b)(?=.*?\btwo three\b)(?=.*?\bfour\b).*$
281281
*/
282-
var a = $.map( search.match( /"[^"]+"|[^ ]+/g ) || '', function ( word ) {
282+
var a = $.map( search.match( /"[^"]+"|[^ ]+/g ) || [''], function ( word ) {
283283
if ( word.charAt(0) === '"' ) {
284284
var m = word.match( /^"(.*)"$/ );
285285
word = m ? m[1] : word;

0 commit comments

Comments
 (0)