aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2021-07-14 07:37:53 -0700
committerGitHub <noreply@github.com>2021-07-14 07:37:53 -0700
commita6b7db5437b04ef7acfcb5f269e88b2451aaa396 (patch)
treef9af3482821708d7a008549b57c5ce235d09bded
parent3a8fa151f46c28274a418aa284c12fe71a827e95 (diff)
parenta5fe53beb2d871ec475611c4b3034871e52a190b (diff)
downloadhomer-a6b7db5437b04ef7acfcb5f269e88b2451aaa396.tar.gz
homer-a6b7db5437b04ef7acfcb5f269e88b2451aaa396.tar.zst
homer-a6b7db5437b04ef7acfcb5f269e88b2451aaa396.zip
Merge pull request #186 from pdevq/connectivity_checker_status
Fix ConnectivityChecker to evaluate the response status codes
-rw-r--r--src/components/ConnectivityChecker.vue8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue
index d41c443..7302e1f 100644
--- a/src/components/ConnectivityChecker.vue
+++ b/src/components/ConnectivityChecker.vue
@@ -37,8 +37,12 @@ export default {
37 method: "HEAD", 37 method: "HEAD",
38 cache: "no-store", 38 cache: "no-store",
39 }) 39 })
40 .then(function () { 40 .then(function (response) {
41 that.offline = false; 41 if (response.status >= 200 && response.status < 300) {
42 that.offline = false;
43 } else {
44 that.offline = true;
45 }
42 }) 46 })
43 .catch(function () { 47 .catch(function () {
44 that.offline = true; 48 that.offline = true;