fix immutable get bug
@@ -4,12 +4,13 @@ import { SET_DEBOUNCING, SET_TIMER } from "types/debounce";
export const setDebouncing = (formID: string, name: string): ThunkResult<void> => {
return (dispatch, getState) => {
const debounceState = getState().get("debounce");
+
dispatch({
type: SET_DEBOUNCING,
payload: { formID, name, debouncing: false },
});
- const currentTimer = debounceState.get(formID)?.get(name).get("timer");
+ const currentTimer = debounceState.get(formID)?.get(name)?.get("timer");
if (currentTimer) {
window.clearTimeout(currentTimer);
}
