Skip to content

Commit e6515c9

Browse files
xDivisionByZeroxST-DDT
authored andcommitted
refactor: array empty check
1 parent 4c9d884 commit e6515c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/random.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ export class Random {
484484
charsArray = arrayRemove(charsArray, options.bannedChars);
485485
}
486486

487-
if (charsArray.length <= 0) {
487+
if (charsArray.length === 0) {
488488
throw new Error(
489489
'Unable to generate string, because all possible characters are banned.'
490490
);

0 commit comments

Comments
 (0)