diff --git a/app/controllers/branches.coffee b/app/controllers/branches.coffee
index 5d977e86..e2b73697 100644
--- a/app/controllers/branches.coffee
+++ b/app/controllers/branches.coffee
@@ -7,15 +7,16 @@ BranchesController = Ember.Controller.extend
defaultBranch: (->
repos = @get('model')
output = repos.filter (item, index) ->
- item if item.default_branch == true
+ item.default_branch
if output.length
output[0]
).property('model')
activeBranches: (->
repos = @get('model')
+ console.log repos
repos = repos.filter (item, index) ->
- item if item.exists_on_github == true && item.default_branch == false
+ item.exists_on_github && !item.default_branch
.sortBy('last_build.finished_at')
.reverse()
).property('model')
@@ -23,7 +24,7 @@ BranchesController = Ember.Controller.extend
inactiveBranches: (->
repos = @get('model')
repos = repos.filter (item, index) ->
- item if item.exists_on_github == false
+ !item.exists_on_github && !item.default_branch
.sortBy('last_build.finished_at')
.reverse()
).property('model')
diff --git a/app/templates/branches.hbs b/app/templates/branches.hbs
index ebbe5f7e..f94b7b78 100644
--- a/app/templates/branches.hbs
+++ b/app/templates/branches.hbs
@@ -6,7 +6,7 @@
- {{#if activeBranches}}
+ {{#if activeBranches.length}}
{{/if}}
- {{#if inactiveBranches}}
+ {{#if inactiveBranches.length}}