From 79fb39bdd66a8b75fa71d1519f4c6b4fbc563178 Mon Sep 17 00:00:00 2001 From: jlukic Date: Thu, 30 Apr 2015 18:55:51 -0400 Subject: [PATCH] Match is slightly more performant --- src/definitions/modules/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/modules/search.js b/src/definitions/modules/search.js index d145f4fb0..5657a076c 100644 --- a/src/definitions/modules/search.js +++ b/src/definitions/modules/search.js @@ -491,7 +491,7 @@ $.fn.search = function(parameters) { fieldExists = (typeof content[field] == 'string') ; if(fieldExists) { - if( content[field].match(matchRegExp) ) { + if( content[field].search(matchRegExp) !== -1) { // content starts with value (first in results) addResult(results, content); }