debian-mirror-gitlab/app/assets/javascripts/reports/store/getters.js

17 lines
375 B
JavaScript
Raw Normal View History

2018-11-18 11:00:15 +05:30
import { LOADING, ERROR, SUCCESS, STATUS_FAILED } from '../constants';
export const summaryStatus = state => {
if (state.isLoading) {
return LOADING;
}
if (state.hasError || state.status === STATUS_FAILED) {
return ERROR;
}
return SUCCESS;
};
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {};