Unverified Commit 2ebd5c64 authored by Martin MacDonald's avatar Martin MacDonald Committed by GitHub

fix: copy by reference (#3517)

* Fixed issue with copy by reference

* Fixed linting issues

---------
Co-authored-by: 's avatarMartin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
parent 0977acbc
...@@ -17,7 +17,7 @@ export const useMemoStore = create( ...@@ -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;
} }
......
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