check if watcher is defined before print

stable
Juanfran 2014-11-12 09:33:58 +01:00
parent c98996a8c5
commit d41ea2faa6
1 changed files with 3 additions and 0 deletions

View File

@ -175,6 +175,7 @@ WatchersDirective = ($rootscope, $confirm, $repo) ->
<% }; %>
<% _.each(watchers, function(watcher) { %>
<% if(watcher) { %>
<div class="watcher-single">
<div class="watcher-avatar">
<span class="avatar" href="" title="<%- watcher.full_name_display %>">
@ -191,6 +192,7 @@ WatchersDirective = ($rootscope, $confirm, $repo) ->
<% }; %>
</div>
</div>
<% } %>
<% }); %>
""")
@ -214,6 +216,7 @@ WatchersDirective = ($rootscope, $confirm, $repo) ->
watchers: watchers
isEditable: isEditable()
}
html = template(ctx)
$el.html(html)