Fix useless conditional

This commit is contained in:
Adam Harvey
2020-12-09 16:02:52 -05:00
parent 6fde301a99
commit a6b8d6163d
+1 -1
View File
@@ -50,7 +50,7 @@ const EntityPageSwitch = ({ EntityPage }: { EntityPage: ComponentType }) => {
const { entity, loading, error } = useEntity();
// Loading and error states
if (loading) return <EntityPageLayout />;
if (error || (!loading && !entity)) return <EntityNotFound />;
if (error || !entity) return <EntityNotFound />;
// Otherwise EntityPage provided from the App
// Note that EntityPage will include EntityPageLayout already