# HG changeset patch # User Marcin Kuzminski # Date 2017-01-09 12:24:26 # Node ID 2eefb2848178153cc0003dfa783fb713377ec037 # Parent 27ca0c8b812b28beeac86e0643ad633a485aae31 templates: fix JS error for comment form in anonymous mode. diff --git a/rhodecode/templates/changeset/changeset_file_comment.mako b/rhodecode/templates/changeset/changeset_file_comment.mako --- a/rhodecode/templates/changeset/changeset_file_comment.mako +++ b/rhodecode/templates/changeset/changeset_file_comment.mako @@ -289,7 +289,9 @@ var mainCommentForm = new CommentForm( "#${form_id}", commitId, pullRequestId, lineNo, true); - mainCommentForm.cm.setOption('placeholder', "${placeholder}"); + if (mainCommentForm.cm){ + mainCommentForm.cm.setOption('placeholder', "${placeholder}"); + } mainCommentForm.initStatusChangeSelector(); bindToggleButtons();