fix(sessions): Do not send close request without token
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
committed by
backportbot-nextcloud[bot]
parent
9f38e51d9b
commit
df01d8ef79
@@ -143,7 +143,12 @@ export function createSession(boardId) {
|
||||
async close() {
|
||||
clearInterval(interval)
|
||||
document.removeEventListener('visibilitychange', visibilitychangeListener)
|
||||
await sessionApi.closeSession(boardId, await tokenPromise)
|
||||
if (token) {
|
||||
await sessionApi.closeSession(boardId, token)
|
||||
tokenPromise = null
|
||||
token = null
|
||||
delete axios.defaults.headers['x-nc-deck-session']
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user