Skip to content

Commit

Permalink
fix: only hash labels larger than max length
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Miller <[email protected]>
  • Loading branch information
Djelibeybi authored and t0bst4r committed Nov 23, 2024
1 parent 689711e commit 3e71fb3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function maxLengthOrHash(value: string, maxLength: number): string {
if (maxLength < 16) {
throw new Error("MaxLength cannot be shorter than 16");
}
if (value.length < maxLength) {
if (value.length <= maxLength) {
return value;
} else {
const hash = crypto
Expand Down

0 comments on commit 3e71fb3

Please sign in to comment.