mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Fixed session check logic. Closes #1340.
This commit is contained in:
parent
2181ca4ec8
commit
c0276db6e3
@ -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…
Reference in New Issue
Block a user