mirror of https://github.com/bastienwirtz/homer
Simplify the connectivity checker
parent
a6b7db5437
commit
f3b3b89b7c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue