|
@@ -1993,9 +1993,12 @@
|
|
|
|
|
|
|
|
, highlighter: function (item) {
|
|
, highlighter: function (item) {
|
|
|
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
|
|
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
|
|
|
|
|
+ if (!query) {
|
|
|
|
|
+ return item;
|
|
|
|
|
+ }
|
|
|
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
|
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
|
|
return '<strong>' + match + '</strong>'
|
|
return '<strong>' + match + '</strong>'
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
, render: function (items) {
|
|
, render: function (items) {
|