Skip to content

Commit 2ebd5c6

Browse files
mmacdo54Martin MacDonald
andauthored
fix: copy by reference (usememos#3517)
* Fixed issue with copy by reference * Fixed linting issues --------- Co-authored-by: Martin MacDonald <[email protected]>
1 parent 0977acb commit 2ebd5c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/store/v1/memo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const useMemoStore = create(
1717
getState: () => get(),
1818
fetchMemos: async (request: Partial<ListMemosRequest>) => {
1919
const { memos, nextPageToken } = await memoServiceClient.listMemos(request);
20-
const memoMap = get().memoMapByName;
20+
const memoMap = { ...get().memoMapByName };
2121
for (const memo of memos) {
2222
memoMap[memo.name] = memo;
2323
}

0 commit comments

Comments
 (0)