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.

#1340 : Fix when session received is not an array, but the direct object

Kevin Van Ryckegem5ef979d61d07
diff --git a/lib/session.js b/lib/session.js
index 4e0513b10..d8b66e54c 100644
--- a/lib/session.js
+++ b/lib/session.js
@@ -37,7 +37,7 @@ export async function getSession(req) {
let session = await getSessionByUuid(session_uuid);
- session = Array.isArray(session) && session[0] ? session[0] : null;
+ session = Array.isArray(session) && session[0] ? session[0] : session;
if (!session) {
try {