Fix minor javascript problems

- Make sure that the growth rates values used for the charts are Number
- Send the catalogue version as FormData instead of json for the update
- Fix a bug that prevented the display of the characters in the home
page at application startup
This commit is contained in:
dario-cfpt
2020-03-09 22:47:03 +01:00
parent 2d2bf6ea88
commit 7d98eddfe8
3 changed files with 10 additions and 10 deletions

View File

@ -140,12 +140,12 @@ function computeCharacterGrowthRatesWithClass(char) {
charData.name = charName;
charGrowthRates.forEach(gr => {
let grValue = gr.value;
let grValue = Number(gr.value);
if (classGrowthRates != null) {
// Compute the growth rates of the character with the growth rates of the class
let classGr = classGrowthRates.find(x => x.idStat == gr.idStat);
if (classGr != null) {
grValue += classGr.value;
grValue += Number(classGr.value);
}
}
statsValues.push(grValue);