Skip to content

Commit

Permalink
Simplify is archived page check
Browse files Browse the repository at this point in the history
  • Loading branch information
djohalo2 committed Dec 11, 2024
1 parent af322ee commit b197d80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/page-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ const isValidPage = (config: PageTreeConfig, page: RawPageMetadata): boolean =>
};

const isArchivedPage = (config: PageTreeConfig, page: RawPageMetadata): boolean => {
return config.archivedFieldName ? page[config.archivedFieldName] === true : false;
return !!config.archivedFieldName && page[config.archivedFieldName] === true;
};

0 comments on commit b197d80

Please sign in to comment.