Skip to content

Commit 57c03d3

Browse files
committed
Properly display size of files in directory listing
1 parent 5c21a54 commit 57c03d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,11 @@ const renderDirectory = async (current, relativePath, absolutePath, handlers, co
299299
details.isDirectory = true;
300300
} else {
301301
details.ext = details.ext.split('.')[1] || 'txt';
302-
details.size = bytes(stats.size, {unitSeparator: ' '});
302+
303+
details.size = bytes(stats.size, {
304+
unitSeparator: ' ',
305+
decimalPlaces: 0
306+
});
303307
}
304308

305309
details.title = details.base;

0 commit comments

Comments
 (0)