From b022b578fafb106cde1cc193a99a33ea476c77a9 Mon Sep 17 00:00:00 2001 From: "Rasamoelina, Haja Onjatiana" <26148770+rhahao@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:27:00 +0300 Subject: [PATCH] fix(parsing): update variable type in song extraction --- src/common/parsing_rules.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/parsing_rules.ts b/src/common/parsing_rules.ts index 7950ac47..b0da8d9a 100644 --- a/src/common/parsing_rules.ts +++ b/src/common/parsing_rules.ts @@ -52,10 +52,10 @@ export const extractSongNumber = (src: string) => { const parseNum = src.match(/(\d+)/); if (parseNum && parseNum.length > 0) { - const firstNumber = parseNum[0]; + const firstNumber = +parseNum[0]; - if (!isNaN(firstNumber) && firstNumber <= 158) { - return +firstNumber; + if (firstNumber <= 158) { + return firstNumber; } }