merge with 2.0.0-m3

This commit is contained in:
Sebastian Sdorra
2018-12-10 14:36:10 +01:00
35 changed files with 1040 additions and 95 deletions

View File

@@ -2,10 +2,7 @@
import type { Me } from "@scm-manager/ui-types";
import * as types from "./types";
import {
apiClient,
UNAUTHORIZED_ERROR_MESSAGE
} from "@scm-manager/ui-components";
import { apiClient, UNAUTHORIZED_ERROR } from "@scm-manager/ui-components";
import { isPending } from "./pending";
import { getFailure } from "./failure";
import {
@@ -190,7 +187,7 @@ export const fetchMe = (link: string) => {
dispatch(fetchMeSuccess(me));
})
.catch((error: Error) => {
if (error.message === UNAUTHORIZED_ERROR_MESSAGE) {
if (error === UNAUTHORIZED_ERROR) {
dispatch(fetchMeUnauthenticated());
} else {
dispatch(fetchMeFailure(error));