From 6c5dc19f45da4c8edd0cdbc79b9cb74ae4eddde8 Mon Sep 17 00:00:00 2001 From: Nilesh <19304+nileshtrivedi@users.noreply.github.com> Date: Tue, 24 May 2022 16:19:47 +0100 Subject: [PATCH] Fetch reviews correctly in ItemDetail --- src/ItemDetail.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ItemDetail.svelte b/src/ItemDetail.svelte index d1fb812..bb5def6 100644 --- a/src/ItemDetail.svelte +++ b/src/ItemDetail.svelte @@ -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;