Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

update CH session logic

Brian Cao5cfee79b010f
diff --git a/lib/session.js b/lib/session.js
index 44e951c6d..0018b4859 100644
--- a/lib/session.js
+++ b/lib/session.js
@@ -37,8 +37,8 @@ export async function getSession(req) {
let session = await getSessionByUuid(session_uuid);
- if (Array.isArray(session) && session[0]) {
- session = session[0];
+ if (Array.isArray(session)) {
+ session = session.length !== 0 ? session[0] : null;
}
if (!session) {