Skip to content

Commit

Permalink
triage: different behaviour between prod and dev?
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Mar 5, 2024
1 parent 0cde2fe commit 52853f5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/store/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ export const useSession = defineStore('session', {
return true
}
catch (err) {
if (((err as any).data as TRPCError)?.code === 'NOT_FOUND') {
// this handling is a mess.
if (
// in develop this resolves as true
((err as any).data as TRPCError)?.code === 'NOT_FOUND'

// in prod this is true
|| (err as TRPCError)?.code === 'NOT_FOUND'
) {
console.error('not-found')
this.$reset()
}
Expand Down

0 comments on commit 52853f5

Please sign in to comment.