Simplify the connectivity checker

pull/235/head^2
Bastien Wirtz 2021-07-14 16:41:00 +02:00
parent a6b7db5437
commit f3b3b89b7c
1 changed files with 1 additions and 5 deletions

View File

@ -38,11 +38,7 @@ export default {
cache: "no-store", cache: "no-store",
}) })
.then(function (response) { .then(function (response) {
if (response.status >= 200 && response.status < 300) { that.offline = !response.ok;
that.offline = false;
} else {
that.offline = true;
}
}) })
.catch(function () { .catch(function () {
that.offline = true; that.offline = true;