]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - src/components/ConnectivityChecker.vue
Simplify the connectivity checker
[github/bastienwirtz/homer.git] / src / components / ConnectivityChecker.vue
index 7302e1f56a5ea91504c62e506736b3337a3aa752..02cbd7fcd4c45d58888cc8f99bb88e00661c18c3 100644 (file)
@@ -38,11 +38,7 @@ export default {
         cache: "no-store",
       })
         .then(function (response) {
-          if (response.status >= 200 && response.status < 300) {
-            that.offline = false;
-          } else {
-            that.offline = true;
-          }
+          that.offline = !response.ok;
         })
         .catch(function () {
           that.offline = true;