releases.shpreview

Circular values no longer crash event serialization

posthog-js@1.399.3

July 13, 2026PostHog JSView original ↗
1 fixThis release1 fixBug fixesAI-tallied from the release notes
From the original release noteView original ↗

1.399.3

Patch Changes

  • #4133 4ebb618 Thanks @mikenicholls88! - Make jsonStringify circular-safe so event serialization never throws. Previously a captured property holding a circular value — most commonly a DOM node that retains a React fiber pointing back at the element — made JSON.stringify throw Converting circular structure to JSON; with capture_exceptions enabled that throw was recaptured as a new $exception, at times in a loop. On a throw we now fall back to safeJsonStringify from @posthog/core. The fast (non-circular) path is unchanged, and only true cycles become "[Circular]", so shared-but-acyclic references keep their real values. (2026-07-13)

Fetched July 13, 2026