summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-07-31 15:09:15 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:26:12 +0100
commit1a2f12099c91b81075826a8aa1820d964a3e4478 (patch)
treead3eae3f384dc8460e8aa323cc9d4150c0e47a5d /bitbake
parenta9549e839df328d7be561e333c4fe40047037799 (diff)
downloadpoky-1a2f12099c91b81075826a8aa1820d964a3e4478.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/libtoaster.js9
1 files changed, 8 insertions, 1 deletions
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 (){
34 selectedCB(itemObj); 34 selectedCB(itemObj);
35 return item; 35 return item;
36 }, 36 },
37 matcher: function(item) { return ~item.name.toLowerCase().indexOf(this.query.toLowerCase()); }, 37 matcher: function(item) {
38 if (!item.hasOwnProperty('name')) {
39 console.log("Name property missing in data");
40 return 0;
41 }
42
43 return ~item.name.toLowerCase().indexOf(this.query.toLowerCase());
44 },
38 highlighter: function (item) { 45 highlighter: function (item) {
39 if (item.hasOwnProperty('detail')) 46 if (item.hasOwnProperty('detail'))
40 /* Use jquery to escape the value as text into a span */ 47 /* Use jquery to escape the value as text into a span */