mirror of
https://github.com/Radarr/Radarr
synced 2025-02-21 13:57:02 +00:00
Convert formatCustomFormatScore to Typescript
This commit is contained in:
parent
8fd8128641
commit
847d6244aa
1 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
function formatCustomFormatScore(input, customFormatsLength = 0) {
|
||||
function formatCustomFormatScore(
|
||||
input?: number,
|
||||
customFormatsLength = 0
|
||||
): string {
|
||||
const score = Number(input);
|
||||
|
||||
if (score > 0) {
|
||||
|
@ -6,7 +9,7 @@ function formatCustomFormatScore(input, customFormatsLength = 0) {
|
|||
}
|
||||
|
||||
if (score < 0) {
|
||||
return score;
|
||||
return `${score}`;
|
||||
}
|
||||
|
||||
return customFormatsLength > 0 ? '+0' : '';
|
Loading…
Reference in a new issue