From ea5fcd10278f72dec0e623349c273fcc3b068169 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Fri, 8 May 2020 14:39:15 +0300 Subject: [PATCH] [mobile] fix comments --- apps/common/mobile/lib/view/Collaboration.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/common/mobile/lib/view/Collaboration.js b/apps/common/mobile/lib/view/Collaboration.js index 1b228d5d9f..d47f11d1f1 100644 --- a/apps/common/mobile/lib/view/Collaboration.js +++ b/apps/common/mobile/lib/view/Collaboration.js @@ -152,12 +152,14 @@ define([ //Comments sliceQuote: function(text) { - var sliced = text.slice(0,100); - if (sliced.length < text.length) { - sliced += '...'; - return sliced; + if (text) { + var sliced = text.slice(0, 100); + if (sliced.length < text.length) { + sliced += '...'; + return sliced; + } + return text; } - return text; }, renderViewComments: function(comments, indCurComment) { @@ -318,7 +320,7 @@ define([ '
' + name + '
' + '
' + date + '
' + (isAndroid ? '' : '') + - '
' + + '
' + ''; $pageAdd.html(_.template(template)); },