fix #303
This commit is contained in:
parent
9cc21a4b64
commit
5ddf555172
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue