Skip to content

Commit 03ad51c

Browse files
authored
Discard changes to packages/browser/src/session-props.ts
1 parent 927ac42 commit 03ad51c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/browser/src/session-props.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export class SessionPropsManager {
4747
private readonly _sessionSourceParamGenerator: (
4848
instance?: PostHog
4949
) => LegacySessionSourceProps | CurrentSessionSourceProps
50-
private _bootstrappedSessionProps?: Record<string, any>
5150

5251
constructor(
5352
instance: PostHog,
@@ -59,7 +58,6 @@ export class SessionPropsManager {
5958
this._sessionIdManager = sessionIdManager
6059
this._persistence = persistence
6160
this._sessionSourceParamGenerator = sessionSourceParamGenerator || generateSessionSourceParams
62-
this._bootstrappedSessionProps = instance.config.bootstrap?.sessionProps
6361

6462
this._sessionIdManager.onSessionId(this._onSessionIdCallback)
6563
}
@@ -74,7 +72,6 @@ export class SessionPropsManager {
7472
return
7573
}
7674

77-
// Use bootstrapped props if provided for this session, otherwise generate new ones
7875
const newProps: StoredSessionSourceProps = {
7976
sessionId,
8077
props: this._sessionSourceParamGenerator(this._instance),
@@ -103,12 +100,7 @@ export class SessionPropsManager {
103100
}
104101

105102
getSessionProps() {
106-
// If we have bootstrapped session props, use those directly
107-
if (this._bootstrappedSessionProps) {
108-
return this._bootstrappedSessionProps
109-
}
110-
111-
// Otherwise, derive from stored props with $session_entry_ prefix
103+
// it's the same props, but don't include null for unset properties, and add a prefix
112104
const p: Record<string, any> = {}
113105
each(stripEmptyProperties(this.getSetOnceProps()), (v, k) => {
114106
if (k === '$current_url') {

0 commit comments

Comments
 (0)