cloudfoundry/stratos

View on GitHub
src/frontend/packages/store/src/reducers/pagination-reducer/pagination-reducer-max-reached.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function paginationMaxReached has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function paginationMaxReached(state: PaginationState, action: UpdatePaginationMaxedState): PaginationState {
  const entityKey = entityCatalog.getEntityKey(action);
  if (!state[entityKey] || !state[entityKey][action.paginationKey]) {
    return state;
  }

    Avoid too many return statements within this function.
    Wontfix

      return {
        ...state,
        [entityKey]: entityState
      };

      There are no issues that match your filters.

      Category
      Status