mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
fix: Improve safety of PostHog event handling by using optional chaining for properties
This commit is contained in:
parent
5e28125090
commit
7c3aedf811
1 changed files with 2 additions and 2 deletions
|
|
@ -10,8 +10,8 @@ function initPostHog() {
|
|||
defaults: "2025-11-30",
|
||||
capture_pageview: "history_change",
|
||||
capture_pageleave: true,
|
||||
before_send: (event) => {
|
||||
if (event.properties) {
|
||||
before_send: (event) => {
|
||||
if (event?.properties) {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const ref = params.get("ref");
|
||||
if (ref) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue