Skip to content

Commit

Permalink
Simplified boolean expression.
Browse files Browse the repository at this point in the history
  • Loading branch information
asvarcas committed Jan 7, 2020
1 parent 3331f2c commit 590d20b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ra-core/src/core/Resource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const ResourceRoutes: FunctionComponent<ResourceProps> = ({
show,
options = defaultOptions,
}) => {
const isRegistered = useSelector((state: ReduxState) =>
state.admin.resources[name] ? true : false
const isRegistered = useSelector(
(state: ReduxState) => !!state.admin.resources[name]
);

const basePath = match ? match.path : '';
Expand Down

0 comments on commit 590d20b

Please sign in to comment.