aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-02-21 16:27:39 +0200
committerGravatar GitHub <[email protected]>2021-02-21 16:27:39 +0200
commit1b7113627d421f58885625851241d0be0a93f4cb (patch)
treec306ce8018920b1a214c53f9194bcd3f2daba251
parentAdd locking way to show value in ShortText (diff)
Copy state instead changing original
-rw-r--r--src/store/form/reducers.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/store/form/reducers.ts b/src/store/form/reducers.ts
index 21bd047..d7d3388 100644
--- a/src/store/form/reducers.ts
+++ b/src/store/form/reducers.ts
@@ -9,7 +9,7 @@ export const initialState: FormState = {
};
export function formReducer(state = initialState, action: Action): FormState {
- const new_state = state;
+ const new_state = {...state};
switch (action.type) {
case FormAction.SET_VALUE:
new_state.values.set(action.payload.question.id, action.payload.value);