mirror of
https://github.com/usememos/memos.git
synced 2025-11-10 17:31:33 +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(),
|
getState: () => get(),
|
||||||
fetchMemos: async (request: Partial<ListMemosRequest>) => {
|
fetchMemos: async (request: Partial<ListMemosRequest>) => {
|
||||||
const { memos, nextPageToken } = await memoServiceClient.listMemos(request);
|
const { memos, nextPageToken } = await memoServiceClient.listMemos(request);
|
||||||
const memoMap = get().memoMapByName;
|
const memoMap = { ...get().memoMapByName };
|
||||||
for (const memo of memos) {
|
for (const memo of memos) {
|
||||||
memoMap[memo.name] = memo;
|
memoMap[memo.name] = memo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue