From bf9bd56c78b513a3a9b3e8a730bbd02c3d57bd9d Mon Sep 17 00:00:00 2001 From: Filip Noetzel Date: Fri, 21 Mar 2025 08:27:35 +0100 Subject: [PATCH] fix supportsHalf type: boolean --- main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.ts b/main.ts index 68deec9..b7372d2 100644 --- a/main.ts +++ b/main.ts @@ -48,13 +48,13 @@ function generateSymbolsString(rating, symbolCount, full, empty, half, supportsH } // Extract the function to format rating text -function formatRatingText(format, newRating, symbolCount, denominator, supportsHalf) { +function formatRatingText(format, newRating, symbolCount, denominator, supportsHalf: boolean) { let newNumerator; if (format.includes('percent')) { newNumerator = Math.round((newRating / symbolCount) * 100); } else { newNumerator = newRating; - if (supportsHalf !== 'true') { + if (!supportsHalf) { newNumerator = Math.round(newNumerator); } }