Skip to content

Commit

Permalink
Merge pull request #5372 from marmelab/fix-auth-context-ts-compilation
Browse files Browse the repository at this point in the history
Fix default AuthContext value fails TypeScript compilation
  • Loading branch information
djhi authored Oct 8, 2020
2 parents ec289ac + fdc765a commit 27a6927
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/ra-core/src/auth/AuthContext.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createContext } from 'react';

import { AuthProvider } from '../types';
import { AuthProvider, UserIdentity } from '../types';

const defaultIdentity = {
id: null,
const defaultIdentity: UserIdentity = {
id: '',
fullName: null,
};

Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/auth/useGetIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UserIdentity } from '../types';
import { useSafeSetState } from '../util/hooks';

const defaultIdentity = {
id: null,
id: '',
fullName: null,
};

Expand Down

0 comments on commit 27a6927

Please sign in to comment.