lib/travis/client/repository.rb in travis-1.5.6.travis.317.4 vs lib/travis/client/repository.rb in travis-1.5.6.travis.319.4
- old
+ new
@@ -136,11 +136,11 @@
end
self
end
def job(number)
- build_number = number.to_s[/^\d+/]
- build = build(build_number)
+ build_number = number.to_s[/^\d+/] or return nil
+ build = build(build_number) or return nil
job = build.jobs.detect { |j| j.number == number } if number != build_number
job ||= build.jobs.first if build and build.jobs.size == 1
job
end