From 95df3522a15631abc51a4295cae0ea401a8d4e1e Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 14 Sep 2021 19:58:52 +0200 Subject: feat: add eslint-plugin-unicorn (#1936) --- src/features/communityRecipes/store.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/features/communityRecipes') diff --git a/src/features/communityRecipes/store.js b/src/features/communityRecipes/store.js index a3614dd11..05e18e2f7 100644 --- a/src/features/communityRecipes/store.js +++ b/src/features/communityRecipes/store.js @@ -18,11 +18,13 @@ export class CommunityRecipesStore extends FeatureStore { @computed get communityRecipes() { if (!this.stores) return []; - return this.stores.recipePreviews.dev.map((r) => { + return this.stores.recipePreviews.dev.map(recipePreview => { // TODO: Need to figure out if this is even necessary/used - r.isDevRecipe = !!r.author.find((a) => a.email === this.stores.user.data.email); + recipePreview.isDevRecipe = !!recipePreview.author.some( + author => author.email === this.stores.user.data.email, + ); - return r; + return recipePreview; }); } } -- cgit v1.2.3-54-g00ecf