Skip to content

Commit

Permalink
Lint run
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienwirtz committed Jun 5, 2022
1 parent e03e759 commit 10f6f12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/components/ConnectivityChecker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
window.addEventListener(
"online",
function () {
that.checkOffline();
that.checkOffline();
},
false
);
Expand All @@ -56,15 +56,18 @@ export default {
// extra check to make sure we're not offline
let that = this;
const aliveCheckUrl = window.location.href + "?t="+(new Date().valueOf());
const aliveCheckUrl = window.location.href + "?t=" + new Date().valueOf();
return fetch(aliveCheckUrl, {
method: "HEAD",
cache: "no-store",
redirect: "manual"
redirect: "manual",
})
.then(function (response) {
// opaqueredirect means request has been redirected, to auth provider probably
if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) {
if (
(response.type === "opaqueredirect" && !response.ok) ||
[401, 403].indexOf(response.status) != -1
) {
window.location.href = aliveCheckUrl;
}
that.offline = !response.ok;
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ module.exports = {
},
},
devServer: {
disableHostCheck: true
disableHostCheck: true,
},
};

0 comments on commit 10f6f12

Please sign in to comment.