Skip to content

Commit

Permalink
refactor: rename const
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkeyl committed Sep 29, 2024
1 parent 65b15b4 commit 588075d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/helpers/truncate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const truncate = async (parameters: Parameters) => {
if (Array.isArray(message)) {
const [string, { maxLength = Infinity } = {}] = message;

const truncatedMessage = string.slice(0, maxLength);
const body = string.slice(0, maxLength);
const dots = maxLength === Infinity ? '' : '...';

return `${truncatedMessage}${dots}`;
return `${body}${dots}`;
}

return message;
Expand Down

0 comments on commit 588075d

Please sign in to comment.