check if we do have jobs before trying to iterate over them

This commit is contained in:
Sven Fuchs 2012-10-10 12:04:31 +02:00
parent 9c5e709c0c
commit 056f20ddfe
5 changed files with 7 additions and 5 deletions

View File

@ -43,7 +43,7 @@ GIT
GIT
remote: git://github.com/travis-ci/travis-api.git
revision: 3f5cf5f33a6b6ca0ff1562e18c0cd24d3cc010fa
revision: 8abd6fa15076c6403477bda39f8d78ebe10c504d
specs:
travis-api (0.0.1)
backports (~> 2.5)

View File

@ -11,7 +11,9 @@ Travis.RepoController = Travis.Controller.extend
if build = @get('build')
build.updateTimes()
build.get('jobs').forEach (j) -> j.updateTimes()
if jobs = build.get('jobs')
jobs.forEach (j) -> j.updateTimes()
Ember.run.later(@updateTimes.bind(this), Travis.INTERVALS.updateTimes)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
9f4adc71
5b686eb4