mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 11:06:36 +00:00
Fix product card chart rendering error when there is no shopping location (references #658)
This commit is contained in:
@@ -122,7 +122,12 @@ Grocy.Components.ProductCard.Refresh = function(productId)
|
||||
var chart = Grocy.Components.ProductCard.PriceHistoryChart.data;
|
||||
priceHistoryDataPoints.forEach((dataPoint) =>
|
||||
{
|
||||
var key = dataPoint.shopping_location || "empty";
|
||||
var key = __t("Unknown shopping location");
|
||||
if (dataPoint.shopping_location)
|
||||
{
|
||||
key = dataPoint.shopping_location.name
|
||||
}
|
||||
|
||||
if (!datasets[key]) {
|
||||
datasets[key] = []
|
||||
}
|
||||
|
Reference in New Issue
Block a user