summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/invidious/helpers/utils.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr
index 59d8953a..72fdb187 100644
--- a/src/invidious/helpers/utils.cr
+++ b/src/invidious/helpers/utils.cr
@@ -162,7 +162,7 @@ def number_with_separator(number)
end
def short_text_to_number(short_text : String) : Int64
- matches = /(?<number>\d+(\.\d+)?)\s?(?<suffix>[mMkKbB]|())?/.match(short_text)
+ matches = /(?<number>\d+(\.\d+)?)\s?(?<suffix>[mMkKbB]?)/.match(short_text)
number = matches.try &.["number"].to_f || 0.0
case matches.try &.["suffix"].downcase