Skip to content

Commit

Permalink
Better function name
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarbakhtar committed Jun 1, 2019
1 parent d90e335 commit 9d99369
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ra-core/src/sideEffect/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const nextPathnameSelector = state => {
};

const currentPathnameSelector = state => state.router.location;
const errorMessageSelector = (error, defaultMessage) =>
const getErrorMessage = (error, defaultMessage) =>
typeof error === 'string'
? error
: typeof error === 'undefined' || !error.message
Expand Down Expand Up @@ -64,7 +64,7 @@ export default (authProvider?: AuthProvider) => {
error: e,
meta: { auth: true },
});
const errorMessage = errorMessageSelector(
const errorMessage = getErrorMessage(
e,
'ra.auth.sign_in_error'
);
Expand All @@ -83,7 +83,7 @@ export default (authProvider?: AuthProvider) => {
state: { nextPathname: meta.pathName },
})
);
const errorMessage = errorMessageSelector(
const errorMessage = getErrorMessage(
error,
'ra.auth.auth_check_error'
);
Expand Down

0 comments on commit 9d99369

Please sign in to comment.