mirror of
https://github.com/usememos/memos.git
synced 2024-11-10 17:02:21 +08:00
fix: copy by reference (#3517)
* Fixed issue with copy by reference * Fixed linting issues --------- Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
This commit is contained in:
parent
0977acbc7f
commit
2ebd5c64bd
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ export const useMemoStore = create(
|
|||
getState: () => get(),
|
||||
fetchMemos: async (request: Partial<ListMemosRequest>) => {
|
||||
const { memos, nextPageToken } = await memoServiceClient.listMemos(request);
|
||||
const memoMap = get().memoMapByName;
|
||||
const memoMap = { ...get().memoMapByName };
|
||||
for (const memo of memos) {
|
||||
memoMap[memo.name] = memo;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue