ClickUp interview question

How would you fix this reducer? Do you know debounce?