diff --git a/grails-app/assets/javascripts/profileEditor/controllers/CommentController.js b/grails-app/assets/javascripts/profileEditor/controllers/CommentController.js index 06301df8..f1fd17ab 100644 --- a/grails-app/assets/javascripts/profileEditor/controllers/CommentController.js +++ b/grails-app/assets/javascripts/profileEditor/controllers/CommentController.js @@ -76,6 +76,9 @@ profileEditor.controller('CommentController', function (profileService, util, co } comment.children.push(data); } else { + if (!Array.isArray(self.comments)) { + self.comments = []; + } self.comments.push(data); }