From f3b3b89b7c037584a2c3ad463b9d0322d28f0f89 Mon Sep 17 00:00:00 2001
From: Bastien Wirtz <bastien.wirtz@gmail.com>
Date: Wed, 14 Jul 2021 16:41:00 +0200
Subject: Simplify the connectivity checker

---
 src/components/ConnectivityChecker.vue | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'src/components/ConnectivityChecker.vue')

diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue
index 7302e1f..02cbd7f 100644
--- a/src/components/ConnectivityChecker.vue
+++ b/src/components/ConnectivityChecker.vue
@@ -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;
-- 
cgit v1.2.3

