Skip to content

Commit

Permalink
Merge pull request #4510 from nextcloud/bugfix/noid/close-without-token
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Mar 10, 2023
2 parents 5a36c64 + 25f86be commit d9f83b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
},
}
}

0 comments on commit d9f83b7

Please sign in to comment.