mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-01-27 08:18:53 +01:00
Simplify the connectivity checker
This commit is contained in:
parent
a6b7db5437
commit
f3b3b89b7c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user