Skip to content

Commit

Permalink
fix: landing page with collections data
Browse files Browse the repository at this point in the history
  • Loading branch information
candicecz committed Jun 6, 2024
1 parent a409acb commit 2c7e8f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { ToggleContainer } from 'src/components/toggle-container';
import { formatAuthorsList2String } from 'src/utils/helpers/authors';
import { isSourceFundedByNiaid } from 'src/utils/helpers/sources';
import { Skeleton } from 'src/components/skeleton';
import { useRouter } from 'next/router';
import { filterWords } from './helpers';

interface SearchResultCardProps {
Expand Down
4 changes: 4 additions & 0 deletions src/hooks/api/useRepoData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export function useRepoData(options: any = {}) {
const { identifier, abstract, conditionsOfAccess, name, url, genre } =
sourceInfo || {};

// [NOTE]: This is a temporary fix to handle the case where sourceInfo is an array (i.e. VeuPathCatalogs), pending further discussions with NIAID .
if (Array.isArray(sourceInfo)) {
return {};
}
return {
_id: identifier,
abstract: abstract || '',
Expand Down

0 comments on commit 2c7e8f5

Please sign in to comment.