Always send ref_ params (#3582)

This commit is contained in:
dan
2024-04-16 21:28:39 +01:00
committed by GitHub
parent 2974b407be
commit a66c9d0bc4
+4 -4
View File
@@ -15,12 +15,12 @@ import {useSession} from '../../state/session'
import {LogEvents} from './events' import {LogEvents} from './events'
import {Gate} from './gates' import {Gate} from './gates'
let refSrc: string | undefined let refSrc: string
let refUrl: string | undefined let refUrl: string
if (isWeb && typeof window !== 'undefined') { if (isWeb && typeof window !== 'undefined') {
const params = new URLSearchParams(window.location.search) const params = new URLSearchParams(window.location.search)
refSrc = params.get('ref_src') ?? undefined refSrc = params.get('ref_src') ?? ''
refUrl = params.get('ref_url') ?? undefined refUrl = decodeURIComponent(params.get('ref_url') ?? '')
} }
export type {LogEvents} export type {LogEvents}