diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index 115df80a96..22377f08f4 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js @@ -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 */