Skip to content

Commit

Permalink
fix: crash when undefined variable on sessions is checked - fix #85
Browse files Browse the repository at this point in the history
  • Loading branch information
pagoru committed Sep 30, 2024
1 parent 275e54f commit 493070b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/server/src/system/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export const sessions = () => {
//only if last server is different from current one
if (
session &&
session.server !== currentSession.server &&
(session.sessionId !== currentSession.sessionId ||
session.ticketId !== currentSession.ticketId)
session.server !== currentSession?.server &&
(session.sessionId !== currentSession?.sessionId ||
session.ticketId !== currentSession?.ticketId)
) {
$disconnectFromLastServer(accountId, session.server);
console.warn(
Expand Down

0 comments on commit 493070b

Please sign in to comment.