Skip to content

Commit

Permalink
add isArray check
Browse files Browse the repository at this point in the history
  • Loading branch information
Woozl committed Aug 16, 2023
1 parent 5f923ba commit bc9a0b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/fetchCuries.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export default async function fetchCuries(entity, displayAlert, cancel) {
'Failed to contact name resolver to search curies. Please try again later.');
return [];
}

if (!Array.isArray(response)) {
return [];
}
const curieResponse = response.map((node) => node.curie);
if (!curieResponse.length) {
return [];
Expand Down

0 comments on commit bc9a0b6

Please sign in to comment.