Skip to content

Commit 1d80034

Browse files
committed
fix: putting rrweb directly on window for 1.16x.x compatability
1 parent fe8090c commit 1d80034

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

.changeset/bright-readers-work.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'posthog-js': patch
3+
---
4+
5+
fix: no need to put rrweb and friends directly on window in posthog-recorder

packages/browser/src/entrypoints/posthog-recorder.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,4 @@ assignableWindow.__PosthogExtensions__.rrwebPlugins = { getRecordConsolePlugin,
99
assignableWindow.__PosthogExtensions__.rrweb = { record: rrwebRecord, version: 'v2' }
1010
assignableWindow.__PosthogExtensions__.initSessionRecording = (ph) => new LazyLoadedSessionRecording(ph)
1111

12-
// we used to put all of these items directly on window, and now we put it on __PosthogExtensions__
13-
// but that means that old clients which lazily load this extension are looking in the wrong place
14-
// yuck,
15-
// so we also put them directly on the window
16-
// when 1.161.1 is the oldest version seen in production we can remove this
17-
assignableWindow.rrweb = { record: rrwebRecord, version: 'v2' }
18-
assignableWindow.rrwebConsoleRecord = { getRecordConsolePlugin }
19-
assignableWindow.getRecordNetworkPlugin = getRecordNetworkPlugin
20-
2112
export default rrwebRecord

0 commit comments

Comments
 (0)