Don't try to format date if it does not exist
This commit is contained in:
parent
01e0362242
commit
9c7606ff96
assets/scripts/app/models
|
@ -78,7 +78,8 @@ require 'travis/model'
|
||||||
@_super(key)
|
@_super(key)
|
||||||
|
|
||||||
formattedFinishedAt: (->
|
formattedFinishedAt: (->
|
||||||
moment(@get('finishedAt')).format('lll')
|
if finishedAt = @get('finishedAt')
|
||||||
|
moment(finishedAt).format('lll')
|
||||||
).property('finishedAt')
|
).property('finishedAt')
|
||||||
|
|
||||||
@Travis.Build.reopenClass
|
@Travis.Build.reopenClass
|
||||||
|
|
|
@ -106,7 +106,8 @@ require 'travis/model'
|
||||||
# to use it there easily, I would have to refactor job and build
|
# to use it there easily, I would have to refactor job and build
|
||||||
# controllers
|
# controllers
|
||||||
formattedFinishedAt: (->
|
formattedFinishedAt: (->
|
||||||
moment(@get('finishedAt')).format('lll')
|
if finishedAt = @get('finishedAt')
|
||||||
|
moment(finishedAt).format('lll')
|
||||||
).property('finishedAt')
|
).property('finishedAt')
|
||||||
|
|
||||||
@Travis.Job.reopenClass
|
@Travis.Job.reopenClass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user