Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Mar 23, 2024
1 parent b1dfea2 commit 4eb0fc0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ function isRecordingSnapshot(x: unknown): x is RecordingSnapshot {

export const parseEncodedSnapshots = async (
items: (RecordingSnapshot | EncodedRecordingSnapshot | string)[],
sessionId: string
sessionId: string,
// this is only kept so that we can export the untransformed data for debugging
withMobileTransformer: boolean = true
): Promise<RecordingSnapshot[]> => {
if (!postHogEEModule) {
postHogEEModule = await posthogEE()
Expand All @@ -83,7 +85,9 @@ export const parseEncodedSnapshots = async (
const snapshotData = isRecordingSnapshot(snapshotLine) ? [snapshotLine] : snapshotLine['data']

return snapshotData.map((d: unknown) => {
const snap = postHogEEModule?.mobileReplay?.transformEventToWeb(d) || (d as eventWithTime)
const snap = withMobileTransformer
? postHogEEModule?.mobileReplay?.transformEventToWeb(d) || (d as eventWithTime)
: (d as eventWithTime)
return {
// this handles parsing data that was loaded from blob storage "window_id"
// and data that was exported from the front-end "windowId"
Expand Down

0 comments on commit 4eb0fc0

Please sign in to comment.