Commit 52704674 authored by therealwolf's avatar therealwolf 💯
Browse files

fixed string to number

parent a14c7ef0
......@@ -32,7 +32,8 @@ export let add_values = (values) => {
for (let v of values) {
for (let key of Object.keys(v)) {
if (!x[key]) x[key] = 0;
x[key] += v[key] ? v[key] : 0;
x[key] = Number(x[key]);
x[key] += v[key] ? Number(v[key]) : 0;
x[key] = x[key] ? parseFloat(x[key].toFixed(3)) : x[key];
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment