]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
ConnectivityChecker: Bug Fix - Remove double // in aliveCheckUrl causing Invalid...
authorbchavez <bchavez@bitarmory.com>
Mon, 24 Oct 2022 03:52:30 +0000 (21:52 -0600)
committerBastien Wirtz <bastien.wirtz@gmail.com>
Sat, 5 Nov 2022 21:35:41 +0000 (22:35 +0100)
src/components/ConnectivityChecker.vue

index 0e724fc6d59ced9c8077bd71ca29a2ec381bae9f..5c7761815051bbc4f75a475d1ab87832c685b1e0 100644 (file)
@@ -56,9 +56,8 @@ export default {
 
       // extra check to make sure we're not offline
       let that = this;
-      const aliveCheckUrl = `${window.location.origin}${
-        window.location.pathname
-      }/index.html?t=${new Date().valueOf()}`;
+      const urlPath = window.location.pathname.replace(/\/+$/, "");
+      const aliveCheckUrl = `${window.location.origin}${urlPath}/index.html?t=${new Date().valueOf()}`;
       return fetch(aliveCheckUrl, {
         method: "HEAD",
         cache: "no-store",