bitbake: toastergui: libtoaster Throw an exception no url is specified

At a minimum for this typeahead to work we need a url parameter to call
for a JSON reponse of items to filter on.

(Bitbake rev: 80b214d93c5df63a251b807ca93f81f00c6bfeb2)

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:
Michael Wood
2015-08-04 22:46:35 +03:00
committed by Richard Purdie
parent aff29d2cd8
commit 1e7707b63f

View File

@@ -15,6 +15,8 @@ var libtoaster = (function (){
* arg of the item.
*/
function _makeTypeahead (jQElement, xhrUrl, xhrParams, selectedCB) {
if (!xhrUrl || xhrUrl.length === 0)
throw("No url to typeahead supplied");
jQElement.typeahead({
source: function(query, process){