Skip to content

Commit

Permalink
Add zero padding to the widthClass generation
Browse files Browse the repository at this point in the history
Closes #323
Signed-off-by: Lukas Kämmerling <[email protected]>
  • Loading branch information
LKaemmerling committed May 2, 2022
1 parent 0a3ffdb commit a20da22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/src/js/components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Table extends Component {
let href = (p.Hostname + p.Pathname) || p.URL;
let widthClass = "";
if(state.total > 0) {
widthClass = "w" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5));
widthClass = "w" + ("" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5))).padStart(2, '0');
}

let label = p.Pathname
Expand Down

0 comments on commit a20da22

Please sign in to comment.