aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-03-02 20:02:34 +0800
committerGitHub <noreply@github.com>2024-03-02 12:02:34 +0000
commitc0c2cb933bc59c5c9b2558c9bf53b495504f35f3 (patch)
tree491a3f280c57cd2064d4721a3aa5dd1c87aef9fc /web_src/js/features
parent90435847792d26ac3f23f1a8479706afadec6b15 (diff)
downloadgitea-c0c2cb933bc59c5c9b2558c9bf53b495504f35f3.tar.gz
gitea-c0c2cb933bc59c5c9b2558c9bf53b495504f35f3.zip
Fix incorrect subpath in links (#29535)
* `$referenceUrl`: it is constructed by "Issue.Link", which already has the "AppSubURL" * `window.location.href`: AppSubURL could be empty string, so it needs the trailing slash
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/notification.js2
-rw-r--r--web_src/js/features/stopwatch.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/notification.js b/web_src/js/features/notification.js
index 4dcf02d2dc..a9236247c6 100644
--- a/web_src/js/features/notification.js
+++ b/web_src/js/features/notification.js
@@ -112,7 +112,7 @@ export function initNotificationCount() {
type: 'close',
});
worker.port.close();
- window.location.href = appSubUrl;
+ window.location.href = `${appSubUrl}/`;
} else if (event.data.type === 'close') {
worker.port.postMessage({
type: 'close',
diff --git a/web_src/js/features/stopwatch.js b/web_src/js/features/stopwatch.js
index e7e20e5212..2ec74344fc 100644
--- a/web_src/js/features/stopwatch.js
+++ b/web_src/js/features/stopwatch.js
@@ -75,7 +75,7 @@ export function initStopwatch() {
type: 'close',
});
worker.port.close();
- window.location.href = appSubUrl;
+ window.location.href = `${appSubUrl}/`;
} else if (event.data.type === 'close') {
worker.port.postMessage({
type: 'close',