Browse Source

Match is slightly more performant

pull/2209/head
jlukic 9 years ago
parent
commit
79fb39bdd6
1 changed files with 1 additions and 1 deletions
  1. 2
      src/definitions/modules/search.js

2
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);
}

Loading…
Cancel
Save