All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] toaster: trim build target input
@ 2017-06-27 22:07 David Reyna
  0 siblings, 0 replies; only message in thread
From: David Reyna @ 2017-06-27 22:07 UTC (permalink / raw)
  To: toaster

From: David Reyna <David.Reyna@windriver.com>

Trim the entered built target value so that Toaster is not
confused with no real targets nor a ghost second target.

[YOCTO #11727]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
index 92ab2d6..69220aa 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
@@ -73,14 +73,14 @@ function projectTopBarInit(ctx) {
 
   newBuildTargetBuildBtn.click(function (e) {
     e.preventDefault();
-    if (!newBuildTargetInput.val()) {
+    if (!newBuildTargetInput.val().trim()) {
       return;
     }
     /* We use the value of the input field so as to maintain any command also
      * added e.g. core-image-minimal:clean and because we can build targets
      * that toaster doesn't yet know about
      */
-    selectedTarget = { name: newBuildTargetInput.val() };
+    selectedTarget = { name: newBuildTargetInput.val().trim() };
 
     /* Fire off the build */
     libtoaster.startABuild(null, selectedTarget.name,
-- 
1.9.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-27 22:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 22:07 [PATCH] toaster: trim build target input David Reyna

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.