Coursemology/coursemology2

View on GitHub
client/app/bundles/course/assessment/submission/reducers/questionsFlags.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function default has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function (state = {}, action) {
  switch (action.type) {
    case actions.FETCH_SUBMISSION_SUCCESS:
    case actions.UNSUBMIT_SUCCESS:
    case actions.FINALISE_SUCCESS:

Avoid too many return statements within this function.
Open

      return {
        ...state,
        [questionId]: {
          ...state[questionId],
          isResetting: false,

Avoid too many return statements within this function.
Open

      return {
        ...state,
        [questionId]: {
          ...state[questionId],
          isResetting: true,

There are no issues that match your filters.

Category
Status