Skip to content

Commit c73a258

Browse files
committed
Fix handling of logout event (go-gitea#15323)
Backport go-gitea#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 <[email protected]>
1 parent 38d184d commit c73a258

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web_src/js/features/notification.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function initNotificationCount() {
6666
} else if (event.data.type === 'error') {
6767
console.error(event.data);
6868
} else if (event.data.type === 'logout') {
69-
if (event.data !== 'here') {
69+
if (event.data.data !== 'here') {
7070
return;
7171
}
7272
worker.port.postMessage({

web_src/js/features/stopwatch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export async function initStopwatch() {
4747
} else if (event.data.type === 'error') {
4848
console.error(event.data);
4949
} else if (event.data.type === 'logout') {
50-
if (event.data !== 'here') {
50+
if (event.data.data !== 'here') {
5151
return;
5252
}
5353
worker.port.postMessage({

0 commit comments

Comments
 (0)