Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix(editor): show newly linked memos when editing a memo with attachments

Johnny026ea92f7b40
diff --git a/web/src/components/MemoEditor/components/RelationList.tsx b/web/src/components/MemoEditor/components/RelationList.tsx
index dc042df19..755f9e8eb 100644
--- a/web/src/components/MemoEditor/components/RelationList.tsx
+++ b/web/src/components/MemoEditor/components/RelationList.tsx
@@ -39,7 +39,7 @@ const RelationItemCard: FC<{
};
const RelationList: FC<RelationListProps> = ({ relations, onRelationsChange, parentPage, memoName }) => {
- const referenceRelations = relations.filter((r) => r.type === MemoRelation_Type.REFERENCE && (!memoName || r.memo?.name === memoName));
+ const referenceRelations = relations.filter((r) => r.type === MemoRelation_Type.REFERENCE && (!memoName || !r.memo?.name || r.memo.name === memoName));
const [fetchedMemos, setFetchedMemos] = useState<Record<string, MemoRelation_Memo>>({});
useEffect(() => {