diff --git a/src/app/components/create-status/create-status.component.ts b/src/app/components/create-status/create-status.component.ts index 3f5b51bc..22ea854d 100644 --- a/src/app/components/create-status/create-status.component.ts +++ b/src/app/components/create-status/create-status.component.ts @@ -649,6 +649,11 @@ export class CreateStatusComponent implements OnInit, OnDestroy { while (trucatedStatus.length > currentMaxCharLength) { const nextIndex = trucatedStatus.lastIndexOf(' ', maxChars); + + if(nextIndex === -1){ + break; + } + results.push(trucatedStatus.substr(0, nextIndex) + ' (...)'); trucatedStatus = aggregateMention + trucatedStatus.substr(nextIndex + 1); }