diff --git a/src/transformers/normalize.ts b/src/transformers/normalize.ts index 9b6aeaa..85e24ee 100644 --- a/src/transformers/normalize.ts +++ b/src/transformers/normalize.ts @@ -56,7 +56,7 @@ export const truncateLinkText = ( truncatedText = text.replace(/(^\w+:|^)\/\//, '') } - if (maxLength === 0) { + if (maxLength <= 0) { throw new Error('maxLength must be greater than 0') }