about summary refs log tree commit diff
path: root/app/assets/javascripts/components
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components')
-rw-r--r--app/assets/javascripts/components/actions/cards.jsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/components/actions/cards.jsx b/app/assets/javascripts/components/actions/cards.jsx
index ee421d5d7..714e80525 100644
--- a/app/assets/javascripts/components/actions/cards.jsx
+++ b/app/assets/javascripts/components/actions/cards.jsx
@@ -9,13 +9,12 @@ export function fetchStatusCard(id) {
     dispatch(fetchStatusCardRequest(id));
 
     api(getState).get(`/api/v1/statuses/${id}/card`).then(response => {
-      dispatch(fetchStatusCardSuccess(id, response.data));
-    }).catch(error => {
-      if (error.response.status === 404) {
-        // This is fine
+      if (response.data.length === 0) {
         return;
       }
 
+      dispatch(fetchStatusCardSuccess(id, response.data));
+    }).catch(error => {
       dispatch(fetchStatusCardFail(id, error));
     });
   };