From a5fe53beb2d871ec475611c4b3034871e52a190b Mon Sep 17 00:00:00 2001 From: pdevq <45507854+pdevq@users.noreply.github.com> Date: Sat, 30 Jan 2021 00:17:24 -0500 Subject: [PATCH] Fix ConnectivityChecker to evaluate the response status codes. --- src/components/ConnectivityChecker.vue | 8 ++++++-- 1 file 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 { method: "HEAD", cache: "no-store", }) - .then(function () { - that.offline = false; + .then(function (response) { + if (response.status >= 200 && response.status < 300) { + that.offline = false; + } else { + that.offline = true; + } }) .catch(function () { that.offline = true; -- 2.41.0