about summary refs log tree commit diff
path: root/app/assets
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-20 01:07:53 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-20 01:07:53 +0100
commitc8e4b9c66350e3a3f1b5fee6812f7e7eb97c0677 (patch)
tree65dc748ae1ac81f501314c62dc95e51c25c6d02c /app/assets
parentf0de621e76b5a5ba3f7e67bd88c0183aac22b985 (diff)
No loading bars for cards, no failure if it 404s (that's expected)
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/components/actions/cards.jsx14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/actions/cards.jsx b/app/assets/javascripts/components/actions/cards.jsx
index 808f1835b..ee421d5d7 100644
--- a/app/assets/javascripts/components/actions/cards.jsx
+++ b/app/assets/javascripts/components/actions/cards.jsx
@@ -11,6 +11,11 @@ export function fetchStatusCard(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
+        return;
+      }
+
       dispatch(fetchStatusCardFail(id, error));
     });
   };
@@ -19,7 +24,8 @@ export function fetchStatusCard(id) {
 export function fetchStatusCardRequest(id) {
   return {
     type: STATUS_CARD_FETCH_REQUEST,
-    id
+    id,
+    skipLoading: true
   };
 };
 
@@ -27,7 +33,8 @@ export function fetchStatusCardSuccess(id, card) {
   return {
     type: STATUS_CARD_FETCH_SUCCESS,
     id,
-    card
+    card,
+    skipLoading: true
   };
 };
 
@@ -35,6 +42,7 @@ export function fetchStatusCardFail(id, error) {
   return {
     type: STATUS_CARD_FETCH_FAIL,
     id,
-    error
+    error,
+    skipLoading: true
   };
 };