Skip to content

Commit

Permalink
fix: all sdkReplayConfig should have a default value
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Oct 19, 2024
1 parent dfd70e6 commit af6c0ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
4 changes: 4 additions & 0 deletions posthog-react-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Next

# 3.3.6 - 2024-10-19

1. fix: all sdkReplayConfig should have a default value

# 3.3.5 - 2024-10-15

1. fix: only tries to read device context from react-native-device-info if expo libs are not available
Expand Down
2 changes: 1 addition & 1 deletion posthog-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthog-react-native",
"version": "3.3.5",
"version": "3.3.6",
"main": "lib/posthog-react-native/index.js",
"files": [
"lib/"
Expand Down
23 changes: 16 additions & 7 deletions posthog-react-native/src/posthog-rn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,22 @@ export class PostHog extends PostHogCore {
return
}

const sdkReplayConfig = options?.sessionReplayConfig ?? {
maskAllTextInputs: true,
maskAllImages: true,
captureLog: true,
captureNetworkTelemetry: true,
iOSdebouncerDelayMs: 1000,
androidDebouncerDelayMs: 500,
const {
maskAllTextInputs = true,
maskAllImages = true,
captureLog = true,
captureNetworkTelemetry = true,
iOSdebouncerDelayMs = 1000,
androidDebouncerDelayMs = 500,
} = options?.sessionReplayConfig ?? {}

const sdkReplayConfig = {
maskAllTextInputs,
maskAllImages,
captureLog,
captureNetworkTelemetry,
iOSdebouncerDelayMs,
androidDebouncerDelayMs,
}

this.logMsgIfDebug(() =>
Expand Down

0 comments on commit af6c0ec

Please sign in to comment.