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.

chore: fix decouple user name

Stevenc288d491381c
diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx
index e09c766bb..86845d230 100644
--- a/web/src/pages/MemoDetail.tsx
+++ b/web/src/pages/MemoDetail.tsx
@@ -35,7 +35,7 @@ const MemoDetail = () => {
const { systemStatus } = globalStore.state;
const memoId = Number(params.memoId);
const memo = memoStore.state.memos.find((memo) => memo.id === memoId);
- const allowEdit = memo?.creatorUsername === extractUsernameFromName(currentUser.name);
+ const allowEdit = memo?.creatorUsername === extractUsernameFromName(currentUser?.name);
const referenceRelations = memo?.relationList.filter((relation) => relation.type === "REFERENCE") || [];
const commentRelations = memo?.relationList.filter((relation) => relation.relatedMemoId === memo.id && relation.type === "COMMENT") || [];
const comments = commentRelations