From 2bd19cd02623b7c5494c2f7057587252a75746c9 Mon Sep 17 00:00:00 2001 From: Ravi Chintakunta Date: Mon, 17 Feb 2014 23:26:10 -0500 Subject: 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 --- bitbake/lib/toaster/toastergui/templates/base.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 2d2bfcaf99..8d4771c10e 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("="); -- cgit v1.2.3-54-g00ecf