|
@@ -57,8 +57,11 @@ function fetchProducts(category) {
|
|
|
|
|
|
|
|
function getProducts(category) {
|
|
function getProducts(category) {
|
|
|
fetchProducts(category).then(function(xs) {
|
|
fetchProducts(category).then(function(xs) {
|
|
|
|
|
+ data.products = [];
|
|
|
data.allProducts[category] = xs;
|
|
data.allProducts[category] = xs;
|
|
|
- data.products = xs;
|
|
|
|
|
|
|
+ xs.forEach(function (x) {
|
|
|
|
|
+ data.products.push(x);
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|