diff --git a/ts/util/graphemeAndLinkAwareSlice.ts b/ts/util/graphemeAndLinkAwareSlice.ts index f5bd881d2..374b923b9 100644 --- a/ts/util/graphemeAndLinkAwareSlice.ts +++ b/ts/util/graphemeAndLinkAwareSlice.ts @@ -57,7 +57,9 @@ const expandToIncludeEntireLink = ( startIndex < truncated.length && lastIndex > truncated.length ); - if (truncatedLink.length === 0) return truncated; + if (truncatedLink.length === 0) { + return truncated; + } return original.slice(0, truncatedLink[0].lastIndex); };