Skip to content

Commit

Permalink
fix for get index
Browse files Browse the repository at this point in the history
  • Loading branch information
TariqSaiyad committed Jul 9, 2023
1 parent eb50d37 commit bfda5e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cool-eels-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"drupal-fetch": patch
---

Fix for empty jsonapi index
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class DrupalFetch {

if (!link) console.error(`Resource of type '${type}' and locale ${locale} not found.`);

return link.href;
return link?.href;
}

/**
Expand Down

0 comments on commit bfda5e9

Please sign in to comment.