Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added fix to ensure survey answer persistence #129

Merged
merged 5 commits into from
Sep 22, 2017

Conversation

cShingleton
Copy link
Collaborator

When moving back to correct an answer then forward your answer would have been wiped, thus meaning that you could not move backwards and forwards quickly and effectively. This pull fixes this with conditional state checks on answer value.

Copy link
Contributor

@codedavinci codedavinci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codedavinci codedavinci merged commit 67ffa9e into master Sep 22, 2017
@@ -10,6 +10,8 @@ const initialState = {

export function SurveyReducer(state = initialState, action) {
switch (action.type) {
case 'RESET_SURVEY':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the default case as a fallback
Ex:

case 'RESET_SURVEY': default: return state

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, should of thought of that. Thanks, Eddie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants