diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js index 241c5d2e0c..667c5dff6c 100644 --- a/bitbake/lib/toaster/toastergui/static/js/base.js +++ b/bitbake/lib/toaster/toastergui/static/js/base.js @@ -88,10 +88,9 @@ function basePageInit (ctx) { if (!newBuildTargetInput.val()) return; - if (!selectedTarget) - selectedTarget = { name: newBuildTargetInput.val() }; + var selectedTargetName = newBuildTargetInput.val(); /* fire and forget */ - libtoaster.startABuild(ctx.projectBuildUrl, ctx.projectId, selectedTarget.name, null, null); + libtoaster.startABuild(ctx.projectBuildUrl, ctx.projectId, selectedTargetName, null, null); window.location.replace(ctx.projectPageUrl+ctx.projectId); });