X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fcomponents%2FConnectivityChecker.vue;h=02cbd7fcd4c45d58888cc8f99bb88e00661c18c3;hb=f3b3b89b7c037584a2c3ad463b9d0322d28f0f89;hp=7302e1f56a5ea91504c62e506736b3337a3aa752;hpb=a6b7db5437b04ef7acfcb5f269e88b2451aaa396;p=github%2Fbastienwirtz%2Fhomer.git 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;