From 6a2e9f7b534fae3b5e0b2125ac670cb31feb4fa2 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Wed, 24 Oct 2012 16:55:51 +0300 Subject: [PATCH] Fix crash when comments not enabled. Default Docs.Comments#getCount to return 0 when comments aren't enabled. --- template/app/Comments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/app/Comments.js b/template/app/Comments.js index 0a745a78..d5f54d33 100644 --- a/template/app/Comments.js +++ b/template/app/Comments.js @@ -98,7 +98,7 @@ Ext.define('Docs.Comments', { * @inheritdoc Docs.CommentCounts#get */ getCount: function(target) { - return this.counts.get(target); + return this.enabled ? this.counts.get(target) : 0; }, /** -- GitLab