fix Repository.bySlug

This commit is contained in:
Sven Fuchs 2012-09-15 12:38:27 +02:00
parent 7732482b0e
commit 0acf000c45
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ require 'travis/model'
bySlug: (slug) ->
repo = $.select(@find().toArray(), (repo) -> repo.get('slug') == slug)
repo || @find(slug: slug)
if repo.length > 0 then repo else @find(slug: slug)
select: (id) ->
@find().forEach (repository) ->

File diff suppressed because one or more lines are too long