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.

Check for no session. Closes #1075

Mike Cao3fab09d626dd
diff --git a/lib/session.js b/lib/session.js
index 73d02e590..a08eec792 100644
--- a/lib/session.js
+++ b/lib/session.js
@@ -49,6 +49,10 @@ export async function getSession(req) {
country,
device,
});
+
+ if (!session) {
+ return null;
+ }
} catch (e) {
if (!e.message.includes('Unique constraint')) {
throw e;