Skip to content

Commit

Permalink
Remove usage of ECMASCRIPT6 const keyword.
Browse files Browse the repository at this point in the history
Related to geonetwork#8427
  • Loading branch information
josegar74 committed Nov 26, 2024
1 parent 6f3d10c commit d501a40
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@

var humanizeDataSize = function (bytes) {
if (bytes === 0) return "0 Bytes";
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
const i = Math.floor(Math.log(bytes) / Math.log(1024)); // Determine the index for sizes
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
var i = Math.floor(Math.log(bytes) / Math.log(1024)); // Determine the index for sizes
return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + " " + sizes[i]; // Format size
};

Expand Down

0 comments on commit d501a40

Please sign in to comment.