Browse Source

Fix handling of logout event (#15323) (#15337)

Backport #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>
tags/v1.14.0
zeripath 3 years ago
parent
commit
798ac3f85a
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      web_src/js/features/notification.js
  2. 1
    1
      web_src/js/features/stopwatch.js

+ 1
- 1
web_src/js/features/notification.js View File

@@ -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({

+ 1
- 1
web_src/js/features/stopwatch.js View File

@@ -47,7 +47,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({

Loading…
Cancel
Save