Skip to content

Commit

Permalink
fix: linting in useAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser authored Sep 18, 2024
1 parent e64a195 commit b0ad984
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/composables/local/useAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async function getSession(getSessionOptions?: GetSessionOptions): Promise<Sessio

const headers = new Headers(token ? { [config.token.headerName]: token } as HeadersInit : undefined)

const sessionCookie = useCookie<Object | null>('auth:sessionCookie', {
const sessionCookie = useCookie<object | null>('auth:sessionCookie', {
default: () => null,
maxAge: config.token.maxAgeInSeconds,
sameSite: config.token.sameSiteAttribute
Expand All @@ -139,7 +139,8 @@ async function getSession(getSessionOptions?: GetSessionOptions): Promise<Sessio
lastRefreshedAt: lastRefreshedAt.value,
data: data.value
}
} catch (err) {
}
catch (err) {
if (!data.value && err instanceof Error) {
console.error(`Session: unable to extract session, ${err.message}`)
}
Expand Down

0 comments on commit b0ad984

Please sign in to comment.