Fetch reviews correctly in ItemDetail

pull/7/head
Nilesh 2022-05-24 16:19:47 +01:00
rodzic 2770e456d6
commit 6c5dc19f45
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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;