Commit 99823ea1 authored by Anthony Geourjon's avatar Anthony Geourjon
Browse files

Fix comment bug (Thanks @Servan)

parent e2a02825
......@@ -13,7 +13,7 @@ function CommentListController($utilsFactory,$languageFactory, $rootScope) {
}
ctrl.$onChanges=function(){
if(ctrl.comments.length>0){
if(ctrl.comments && ctrl.comments.length>0){
for(var i=0;i<ctrl.comments.length;i++){
if($rootScope._getSession().user==ctrl.comments[i].user.id){
ctrl.comments[i].actions=[{size:'small',actions:[{size:"small",label:ctrl._labels.confirmDeleteArticleBtn, icon:"trash", function:ctrl.deleteComment,functionParams:ctrl.comments[i]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment