Skip to content

Commit

Permalink
Revert "[recorder] set 'hasReplay' to undefined by defaultb (DataDog#697
Browse files Browse the repository at this point in the history
)"

This reverts commit baf627a.
  • Loading branch information
kcaffrey authored Jan 29, 2021
1 parent 5c9747d commit 265899d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/rum-core/src/rawRumEvent.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,5 @@ export interface User {
export interface CommonContext {
user: User
context: Context
hasReplay?: true
hasReplay?: boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('makeRumRecorderPublicApi', () => {
it('if enabled, commonContext.hasReplay should be true only if startSessionRecord is called', () => {
enabledFlags = ['postpone_start_recording']
rumGlobal.init(DEFAULT_INIT_CONFIGURATION)
expect(getCommonContext().hasReplay).toBeUndefined()
expect(getCommonContext().hasReplay).toBe(false)
rumGlobal.startSessionRecord!()
expect(getCommonContext().hasReplay).toBe(true)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/rum-recorder/src/boot/rumRecorderPublicApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type StartRecording = typeof startRecording

export function makeRumRecorderPublicApi(startRumImpl: StartRum, startRecordingImpl: StartRecording) {
const rumRecorderGlobal = makeRumPublicApi((userConfiguration, getCommonContext) => {
let isRecording: true | undefined
let isRecording = false

const startRumResult = startRumImpl(userConfiguration, () => ({
...getCommonContext(),
Expand Down

0 comments on commit 265899d

Please sign in to comment.