mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -66,7 +66,7 @@ export async function initNotificationCount() { | |||||||
|       } else if (event.data.type === 'error') { |       } else if (event.data.type === 'error') { | ||||||
|         console.error(event.data); |         console.error(event.data); | ||||||
|       } else if (event.data.type === 'logout') { |       } else if (event.data.type === 'logout') { | ||||||
|         if (event.data !== 'here') { |         if (event.data.data !== 'here') { | ||||||
|           return; |           return; | ||||||
|         } |         } | ||||||
|         worker.port.postMessage({ |         worker.port.postMessage({ | ||||||
|   | |||||||
| @@ -48,7 +48,7 @@ export async function initStopwatch() { | |||||||
|       } else if (event.data.type === 'error') { |       } else if (event.data.type === 'error') { | ||||||
|         console.error(event.data); |         console.error(event.data); | ||||||
|       } else if (event.data.type === 'logout') { |       } else if (event.data.type === 'logout') { | ||||||
|         if (event.data !== 'here') { |         if (event.data.data !== 'here') { | ||||||
|           return; |           return; | ||||||
|         } |         } | ||||||
|         worker.port.postMessage({ |         worker.port.postMessage({ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user