From 8947b275e08e86adc871f7106bb85beda41c0d80 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 15 Aug 2024 13:37:36 +0530 Subject: [PATCH] ... --- src/pyj/utils.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/utils.pyj b/src/pyj/utils.pyj index 724b80c025..f2f9f3fb01 100644 --- a/src/pyj/utils.pyj +++ b/src/pyj/utils.pyj @@ -144,7 +144,7 @@ def rating_to_stars(value, allow_half_stars=False, star='★', half='⯨'): def human_readable(size, sep=' '): - if size == 0: + if size <= 0: return f'0{sep}B' i = Math.floor(Math.log(size) / Math.log(1024)) size = (size / Math.pow(1024, i)).toFixed(1)