mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-06-21 02:09:15 +02:00
Simplify the connectivity checker
This commit is contained in:
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…
x
Reference in New Issue
Block a user