From: Ravi Chintakunta Date: Tue, 18 Feb 2014 04:26:10 +0000 (-0500) Subject: bitbake: toaster: Bug fix in reload page with parameters X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2bd19cd02623b7c5494c2f7057587252a75746c9;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: Bug fix in reload page with parameters Fix the bug in reload_params function that was failing when the page URL did not have any parameters. (Bitbake rev: 8cba40daf521d1740687f9a030f8472f980a4563) Signed-off-by: Ravi Chintakunta Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 2d2bfcaf99e..8d4771c10e8 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html @@ -25,7 +25,11 @@ function reload_params(params) { splitlist = uri.split("?"); url = splitlist[0], parameters=splitlist[1]; // deserialize the call parameters - cparams = parameters.split("&"); + if(parameters){ + cparams = parameters.split("&"); + }else{ + cparams = [] + } nparams = {} for (i = 0; i < cparams.length; i++) { temp = cparams[i].split("=");