Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sessions): Do not send close request without token #4510

Merged
merged 1 commit into from
Mar 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(sessions): Do not send close request without token
Signed-off-by: Julius Härtl <[email protected]>
juliusknorr committed Mar 6, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
juliusknorr Julius Knorr
commit 25f86beec979c6dee5203428634c8bbb47d04c91
7 changes: 6 additions & 1 deletion src/sessions.js
Original file line number Diff line number Diff line change
@@ -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']
}
},
}
}