diff options
Diffstat (limited to 'src/utils/helpers')
| -rw-r--r-- | src/utils/helpers/format.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/utils/helpers/format.ts b/src/utils/helpers/format.ts index 94aa2e7..44536dd 100644 --- a/src/utils/helpers/format.ts +++ b/src/utils/helpers/format.ts @@ -61,15 +61,11 @@ export const getFormattedPostPreview = (rawPost: RawArticlePreview) => { export const getFormattedPostsList = ( rawPosts: RawArticlePreview[] ): ArticlePreview[] => { - const formattedPosts = rawPosts + return rawPosts .filter((post) => Object.getOwnPropertyNames(post).length > 0) .map((post) => { - const formattedPost = getFormattedPostPreview(post); - - return formattedPost; + return getFormattedPostPreview(post); }); - - return formattedPosts; }; /** |
