mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Fixed session check logic. Closes #1340.
This commit is contained in:
parent
2181ca4ec8
commit
c0276db6e3
1 changed files with 5 additions and 5 deletions
|
|
@ -49,17 +49,17 @@ export async function getSession(req) {
|
|||
country,
|
||||
device,
|
||||
});
|
||||
|
||||
if (!session) {
|
||||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
if (!e.message.includes('Unique constraint')) {
|
||||
if (!e.message.toLowerCase().includes('unique constraint')) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!session) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { session_id } = session;
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue