Simplify the connectivity checker

This commit is contained in:
Bastien Wirtz 2021-07-14 16:41:00 +02:00
parent a6b7db5437
commit f3b3b89b7c

View File

@ -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;