From 934f57c92f48afd2126f2363002c5b34c01e7514 Mon Sep 17 00:00:00 2001 From: Sergei Vassiljev <52636887+sergeivassiljev@users.noreply.github.com> Date: Thu, 13 Jul 2023 14:42:50 +0300 Subject: [PATCH] chore: update MemoRelationListView.tsx (#1933) --- web/src/components/MemoRelationListView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/MemoRelationListView.tsx b/web/src/components/MemoRelationListView.tsx index 74b941eb..cd25584e 100644 --- a/web/src/components/MemoRelationListView.tsx +++ b/web/src/components/MemoRelationListView.tsx @@ -13,10 +13,10 @@ const MemoRelationListView = (props: Props) => { useEffect(() => { const fetchRelatedMemoList = async () => { - const requests = relationList.map((relation) => memoCacheStore.getOrFetchMemoById(relation.relatedMemoId)); - const memoList = await Promise.all(requests); + const memoList = await Promise.all(relationList.map((relation) => memoCacheStore.getOrFetchMemoById(relation.relatedMemoId))); setRelatedMemoList(memoList); }; + fetchRelatedMemoList(); }, [relationList]);