We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 145fdf7 commit bc2a434Copy full SHA for bc2a434
2 files changed
package.json
@@ -1,6 +1,6 @@
1
{
2
"scripts": {
3
- "start": "servor --reload",
+ "start": "servor www --reload",
4
"test": "jest",
5
"test:watch": "jest --watch",
6
"test:coverage": "jest --coverage"
www/js/modules/day.js
@@ -284,8 +284,8 @@ export const DayManager = {
284
const labelClass = type === 'purchase' ? 'stat-value-info' : 'stat-value-success';
285
286
container.innerHTML = itemsArray.map(item => {
287
- const avgRate = item.rates.length > 0
288
- ? (item.rates.reduce((a, b) => a + b, 0) / item.rates.length).toFixed(2)
+ const avgRate = item.quantity > 0
+ ? (item.totalValue / item.quantity).toFixed(2)
289
: 0;
290
291
return `
0 commit comments