Skip to content

Commit

Permalink
fix(Session): fix cookie not deleted in stateless session (closes #27)
Browse files Browse the repository at this point in the history
  • Loading branch information
fa-sharp authored Jun 12, 2023
1 parent 3249d58 commit d1aa5e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/session/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ export class Session<T extends SessionData = SessionData> {
}

/**
* Delete the session. Only applicable for stateful sessions.
* Delete the session.
*/
async destroy(): Promise<void> {
this.deleted = true;
if (Session.#sessionCrypto.stateless) {
return;
}
this.deleted = true;
// Only relay destroy to the store for existing sessions that have not been saved
if (this.created && !this.saved) {
return;
Expand Down

0 comments on commit d1aa5e8

Please sign in to comment.