Fixed another javascript error on race condition

stable
Jesús Espino 2014-08-20 08:51:04 +02:00
parent 4202950383
commit d8d3f3f838
1 changed files with 7 additions and 3 deletions

View File

@ -284,10 +284,14 @@ CreatedByDirective = ->
link = ($scope, $el, $attrs, $model) ->
renderAssignedTo = (instance) ->
ownerId = instance?.owner
owner = null
owner = $scope.usersById?[ownerId]
date = moment(instance.created_date).format("DD MMM YYYY HH:mm")
date = null
if instance?
ownerId = instance.owner
date = moment(instance.created_date).format("DD MMM YYYY HH:mm")
owner = $scope.usersById?[ownerId]
html = template({owner: owner, date: date})
$el.html(html)