Skip to content

Commit

Permalink
Fix: Fix GitPage Url
Browse files Browse the repository at this point in the history
  • Loading branch information
whats2000 committed Sep 4, 2024
1 parent 1edf720 commit 2d8f03e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wwwroot/version.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
async function FetchVersionFromServer() {
try {
// Append a timestamp to the URL to prevent caching
const basePath = window.location.pathname.replace(/\/$/, "");
const timestamp = new Date().getTime();
const response = await fetch(`/version.json?t=${timestamp}`);
const response = await fetch(`${basePath}/version.json?t=${timestamp}`);
const data = await response.json();
return data.version;
} catch (error) {
Expand Down

0 comments on commit 2d8f03e

Please sign in to comment.