profiles fix winrate when decimal
This commit is contained in:
@ -94,7 +94,8 @@ export default class extends AbstractView {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (games.length) {
|
if (games.length) {
|
||||||
winrateDiv.innerText = `Winrate: ${win / (win + lose) * 100}%`;
|
let rate = win / (win + lose) * 100;
|
||||||
|
winrateDiv.innerText = `Winrate: ${rate.toFixed()}%`;
|
||||||
} else {
|
} else {
|
||||||
winrateDiv.innerText = `Winrate: 🤓`
|
winrateDiv.innerText = `Winrate: 🤓`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user