releases.shpreview

Page unload TypeError fixed; session recording crash hardened

posthog-js@1.399.1

July 9, 2026PostHog JSView original ↗
2 fixesThis release2 fixesBug fixesAI-tallied from the release notes

1.399.1

Patch Changes

  • #4122 c915581 Thanks @github-actions! - Fix TypeError: handlePageUnload is not a function thrown on page unload when a version-skewed lazy-loaded surveys chunk produces a survey manager whose prototype lacks handlePageUnload. The delegated call in PostHogSurveys.handlePageUnload() now guards the method as well as the receiver. (2026-07-09)

  • #4124 562ceeb Thanks @posthog! - Session recording no longer crashes on startup when a CDN-loaded recorder chunk runs against an older bundled core. Calls into SessionIdManager.on/onSessionId are now guarded so a core without those methods degrades gracefully instead of throwing a TypeError during start(). (2026-07-09)

Fetched July 9, 2026

Page unload TypeError fixed; session recording crash… — releases.sh