mirror of
https://github.com/usememos/memos.git
synced 2025-01-31 17:48:12 +08:00
chore: update MemoRelationListView.tsx (#1933)
This commit is contained in:
parent
3093f80d68
commit
934f57c92f
1 changed files with 2 additions and 2 deletions
|
@ -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]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue