mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02: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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user