This commit is contained in:
Nicolas Constant 2020-06-30 19:58:38 -04:00
parent 9cc21a4b64
commit 5ddf555172
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 5 additions and 0 deletions

View File

@ -649,6 +649,11 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
while (trucatedStatus.length > currentMaxCharLength) { while (trucatedStatus.length > currentMaxCharLength) {
const nextIndex = trucatedStatus.lastIndexOf(' ', maxChars); const nextIndex = trucatedStatus.lastIndexOf(' ', maxChars);
if(nextIndex === -1){
break;
}
results.push(trucatedStatus.substr(0, nextIndex) + ' (...)'); results.push(trucatedStatus.substr(0, nextIndex) + ' (...)');
trucatedStatus = aggregateMention + trucatedStatus.substr(nextIndex + 1); trucatedStatus = aggregateMention + trucatedStatus.substr(nextIndex + 1);
} }