mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 14:08:38 +00:00
Merge pull request #302 from j0k3r/bugfix/reponse-size-two-decimal
Fix rounding response size
This commit is contained in:
@@ -7,7 +7,7 @@ const ResponseSize = ({ size }) => {
|
||||
if (size > 1024) {
|
||||
// size is greater than 1kb
|
||||
let kb = Math.floor(size / 1024);
|
||||
let decimal = ((size % 1024) / 1024).toFixed(2) * 100;
|
||||
let decimal = Math.round(((size % 1024) / 1024).toFixed(2) * 100);
|
||||
sizeToDisplay = kb + '.' + decimal + 'KB';
|
||||
} else {
|
||||
sizeToDisplay = size + 'B';
|
||||
|
||||
Reference in New Issue
Block a user