Skip to content

Commit

Permalink
Update apiRoutes.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ETLaurent authored Aug 28, 2023
1 parent dd10feb commit 4013a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/apiRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ module.exports = self => {
const shouldRecurse = recursions <= maxRecursions;

if (obj.type === 'relationship') {
// Filter out types that has the `relatedDocument` option set to `false` in their module.
// Filter out types that have the `relatedDocument` option set to `false` in their module.
// Use `default-page` because this option is set on the page-type module,
// which does not actually exist inside `apos.modules`:
const module = obj.withType === '@apostrophecms/page'
? 'default-page'
? 'home-page'
: obj.withType;

return self.apos.modules[module].options.relatedDocument === false && obj.withType;
Expand Down

0 comments on commit 4013a9f

Please sign in to comment.