mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-16 23:39:44 +02:00
Convert formatCustomFormatScore to Typescript
This commit is contained in:
parent
8fd8128641
commit
847d6244aa
@ -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 New Issue
Block a user