From 970d1368aa80fb0dcf672da822e52f4a1af5fbea Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sun, 13 Nov 2016 12:42:27 +0300 Subject: [PATCH] [SSE] Bug 33374. --- apps/common/main/lib/controller/Comments.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/controller/Comments.js b/apps/common/main/lib/controller/Comments.js index 7098fb6e60..9114c3ee5b 100644 --- a/apps/common/main/lib/controller/Comments.js +++ b/apps/common/main/lib/controller/Comments.js @@ -1222,12 +1222,14 @@ define([ for (i = 0; i < comments.length; ++i) { comment = this.findComment(comments[i].asc_getId()); - comment.set('editTextInPopover', true); - comment.set('hint', false); - this.popoverComments.push(comment); + if (comment) { + comment.set('editTextInPopover', true); + comment.set('hint', false); + this.popoverComments.push(comment); + } } - if (this.getPopover()) { + if (this.getPopover() && this.popoverComments.length>0) { if (this.getPopover().isVisible()) { this.getPopover().hide(); }