Merge pull request #4510 from nextcloud/bugfix/noid/close-without-token
This commit is contained in:
@@ -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