aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-04-08 00:48:13 +0100
committerGitHub <noreply@github.com>2021-04-08 02:48:13 +0300
commit05b7e328297142c7ddb888339901524708472a3a (patch)
tree3b5c3fa059a850fd9b6156b8731ed22f549f488a /web_src/js
parent298d56fe8b1689933ef48133524b17c947b0c4da (diff)
downloadgitea-05b7e328297142c7ddb888339901524708472a3a.tar.gz
gitea-05b7e328297142c7ddb888339901524708472a3a.zip
Fix handling of logout event (#15323)
It appears that there is a slight bug in the handling of the data of logout event - the javascript should be testing the data field of the data field for the logout instruction. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'web_src/js')
-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 fca1ddc543..4fa2d3c29a 100644
--- a/web_src/js/features/notification.js
+++ b/web_src/js/features/notification.js
@@ -66,7 +66,7 @@ export async function initNotificationCount() {
} else if (event.data.type === 'error') {
console.error(event.data);
} else if (event.data.type === 'logout') {
- if (event.data !== 'here') {
+ if (event.data.data !== 'here') {
return;
}
worker.port.postMessage({
diff --git a/web_src/js/features/stopwatch.js b/web_src/js/features/stopwatch.js
index ed20ca3227..d664f0d5f2 100644
--- a/web_src/js/features/stopwatch.js
+++ b/web_src/js/features/stopwatch.js
@@ -48,7 +48,7 @@ export async function initStopwatch() {
} else if (event.data.type === 'error') {
console.error(event.data);
} else if (event.data.type === 'logout') {
- if (event.data !== 'here') {
+ if (event.data.data !== 'here') {
return;
}
worker.port.postMessage({