kopia lustrzana https://github.com/learn-awesome/learndb
Fetch reviews correctly in ItemDetail
rodzic
2770e456d6
commit
6c5dc19f45
|
@ -13,7 +13,7 @@
|
|||
item = data[itemid];
|
||||
});
|
||||
|
||||
$: fetch(`/learn/reviews.json?_shape=array&item_id__exact=${itemid}`)
|
||||
$: item && fetch(`/learn/reviews.json?_shape=array&item_id__exact=${item.iid}`)
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
reviews = data;
|
||||
|
|
Ładowanie…
Reference in New Issue