diff options
| author | 2021-02-21 16:27:39 +0200 | |
|---|---|---|
| committer | 2021-02-21 16:27:39 +0200 | |
| commit | 1b7113627d421f58885625851241d0be0a93f4cb (patch) | |
| tree | c306ce8018920b1a214c53f9194bcd3f2daba251 | |
| parent | Add locking way to show value in ShortText (diff) | |
Copy state instead changing original
| -rw-r--r-- | src/store/form/reducers.ts | 2 | 
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); | 
