diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/layerdetails.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js index 291ed98c34..be6bbcd20f 100644 --- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js +++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js | |||
@@ -16,14 +16,15 @@ function layerDetailsPageInit (ctx) { | |||
16 | }); | 16 | }); |
17 | 17 | ||
18 | $(".breadcrumb li:first a").click(function(e){ | 18 | $(".breadcrumb li:first a").click(function(e){ |
19 | e.preventDefault(); | ||
19 | /* By default this link goes to the project configuration page. However | 20 | /* By default this link goes to the project configuration page. However |
20 | * if we have some builds we go there instead of the default href | 21 | * if we have some builds we go there instead of the default href |
21 | */ | 22 | */ |
22 | libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){ | 23 | libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){ |
23 | if (prjInfo.builds && prjInfo.builds.length > 0) { | 24 | if (prjInfo.builds && prjInfo.builds.length > 0) { |
24 | window.location.replace(libtoaster.ctx.projectBuildsUrl); | 25 | window.location.replace(libtoaster.ctx.projectBuildsUrl); |
25 | e.preventDefault(); | 26 | } else { |
26 | return; | 27 | window.location.replace(libtoaster.ctx.projectPageUrl); |
27 | } | 28 | } |
28 | }); | 29 | }); |
29 | }); | 30 | }); |