Skip to content

Commit

Permalink
fix: condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Joozty committed Dec 9, 2024
1 parent 10ef10a commit f6d3c67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web/src/session/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/
import { SessionState } from './types'
import { SESSION_DURATION_SECONDS, SESSION_ID_LENGTH } from './constants'
import { SESSION_DURATION_MS, SESSION_ID_LENGTH } from './constants'

export const isSessionState = (maybeSessionState: unknown): maybeSessionState is SessionState =>
typeof maybeSessionState === 'object' &&
Expand All @@ -29,7 +29,7 @@ export const isSessionState = (maybeSessionState: unknown): maybeSessionState is

export const isSessionDurationExceeded = (sessionState: SessionState): boolean => {
const now = Date.now()
return sessionState.startTime > now || now > sessionState.startTime + SESSION_DURATION_SECONDS
return sessionState.startTime > now || now > sessionState.startTime + SESSION_DURATION_MS
}

export const isSessionInactivityTimeoutReached = (sessionState: SessionState): boolean => {
Expand Down

0 comments on commit f6d3c67

Please sign in to comment.