Commit c288d491 authored by Steven's avatar Steven

chore: fix decouple user name

parent 0ea06452
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment