Skip to content

Commit

Permalink
refactor: truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkeyl committed Sep 29, 2024
1 parent 37f7eef commit 681855f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/features/helpers/truncate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import type { Parameters } from './parameters.ts';
const truncate = async (parameters: Parameters) => {
const { message } = parameters;

let string;

if (Array.isArray(message)) {
let string = '';
let maxLength = Infinity;

[string, { maxLength = maxLength } = {}] = message;
Expand Down

0 comments on commit 681855f

Please sign in to comment.