Selaa lähdekoodia

Merge pull request #190 from smiclea/login-notification

Disable notifications while on Login page
Dorin Paslaru 8 vuotta sitten
vanhempi
sitoutus
36b4a73e84
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      src/utils/ApiCaller.js

+ 3 - 1
src/utils/ApiCaller.js

@@ -102,7 +102,9 @@ class ApiCaller {
         } else if (error.request) {
         } else if (error.request) {
           // The request was made but no response was received
           // The request was made but no response was received
           // `error.request` is an instance of XMLHttpRequest
           // `error.request` is an instance of XMLHttpRequest
-          NotificationStore.notify('Request failed, there might be a problem with the connection to the server.', 'error')
+          if (window.location.hash !== loginUrl) {
+            NotificationStore.notify('Request failed, there might be a problem with the connection to the server.', 'error')
+          }
           console.log(`%cError No Response: ${axiosOptions.url}`, 'color: #D0021B')
           console.log(`%cError No Response: ${axiosOptions.url}`, 'color: #D0021B')
           reject({})
           reject({})
         } else {
         } else {