From 2d2875e970d0534973a76ff182441e31f3bd3c70 Mon Sep 17 00:00:00 2001
From: Alexandru Munteanu <alexandru.munt@gmail.com>
Date: Mon, 21 May 2018 11:30:42 +0300
Subject: [PATCH] (dashboard-card): bug fix

---
 .../src/components/Dashboard/DashboardCard.js                 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/components-faraday/src/components/Dashboard/DashboardCard.js b/packages/components-faraday/src/components/Dashboard/DashboardCard.js
index baedc2781..a47c5ee88 100644
--- a/packages/components-faraday/src/components/Dashboard/DashboardCard.js
+++ b/packages/components-faraday/src/components/Dashboard/DashboardCard.js
@@ -169,7 +169,9 @@ const DashboardCard = ({
 const isHEToManuscript = (state, collectionId) => {
   const currentUserId = get(state, 'currentUser.user.id')
   const collections = get(state, 'collections') || []
-  const collection = collections.find(c => c.id === collectionId) || {}
+  const collection = collections.find(c => c.id === collectionId) || {
+    invitations: [],
+  }
   const userInvitation = collection.invitations.find(
     i => i.role === 'handlingEditor' && i.userId === currentUserId,
   )
-- 
GitLab