Skip to content

Commit cd4d0da

Browse files
committed
createController: fix
1 parent dad6134 commit cd4d0da

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/ra-core/src/controller/create/useCreateController.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ export const useCreateController = <
7171
const { isPending: isPendingCanAccess } = useRequireAccess<RecordType>({
7272
action: 'create',
7373
resource,
74-
// If disableAuthentication is true then isPendingAuthenticated will always be true so this hook is disabled
75-
enabled: !isPendingAuthenticated,
74+
enabled: !disableAuthentication && !isPendingAuthenticated,
7675
});
7776
const { hasEdit, hasShow } = useResourceDefinition(props);
7877
const finalRedirectTo =

0 commit comments

Comments
 (0)