|
@@ -34,7 +34,14 @@ var libtoaster = (function (){
|
|
|
selectedCB(itemObj);
|
|
|
return item;
|
|
|
},
|
|
|
- matcher: function(item) { return ~item.name.toLowerCase().indexOf(this.query.toLowerCase()); },
|
|
|
+ matcher: function(item) {
|
|
|
+ if (!item.hasOwnProperty('name')) {
|
|
|
+ console.log("Name property missing in data");
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ return ~item.name.toLowerCase().indexOf(this.query.toLowerCase());
|
|
|
+ },
|
|
|
highlighter: function (item) {
|
|
|
if (item.hasOwnProperty('detail'))
|
|
|
/* Use jquery to escape the value as text into a span */
|