mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 22:58:19 -05:00
fix rounding on new shopping list
This commit is contained in:
@@ -682,7 +682,6 @@ export default {
|
|||||||
|
|
||||||
this.settings = getUserPreference()
|
this.settings = getUserPreference()
|
||||||
this.delay = Number(this.settings.default_delay || 4)
|
this.delay = Number(this.settings.default_delay || 4)
|
||||||
console.log(this.delay)
|
|
||||||
this.supermarket_categories_only = this.settings.filter_to_supermarket
|
this.supermarket_categories_only = this.settings.filter_to_supermarket
|
||||||
if (this.settings.shopping_auto_sync) {
|
if (this.settings.shopping_auto_sync) {
|
||||||
window.addEventListener("online", this.updateOnlineStatus)
|
window.addEventListener("online", this.updateOnlineStatus)
|
||||||
|
|||||||
@@ -151,6 +151,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
for (const [k, v] of Object.entries(amount)) {
|
||||||
|
amount[k] = Math.round(v * 100 + Number.EPSILON) / 100 // javascript hack to force rounding at 2 places
|
||||||
|
}
|
||||||
return amount
|
return amount
|
||||||
},
|
},
|
||||||
formatCategory: function () {
|
formatCategory: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user