mirror of
https://git.yoctoproject.org/poky
synced 2026-05-01 15:32:12 +02:00
bitbake: toastergui: libtoaster: Add guard against missing name property
Add a debug warning if a JSON payload isn't compatible. i.e. without a name field. (Bitbake rev: e65de693670203ddcbf5f23ad2a91c523df879d8) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a9549e839d
commit
1a2f12099c
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user