Skip to content

Commit 887c909

Browse files
committed
fix
1 parent 4d7e01f commit 887c909

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/ufs_statistic.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,5 +768,8 @@ function limitString(string, length) {
768768
}
769769

770770
function padStr(string, length, char = " ") {
771-
return string + char.repeat(length - string.length);
771+
return (
772+
string +
773+
(length - string.length > 0 ? char.repeat(length - string.length) : "")
774+
);
772775
}

0 commit comments

Comments
 (0)