Skip to content

Commit

Permalink
fix(hydration error): Set offsets when grabbing the HTML diff content…
Browse files Browse the repository at this point in the history
… so we see the results of the render (#83522)
  • Loading branch information
ryan953 authored Jan 15, 2025
1 parent f561a7b commit 6f8412f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/app/components/replays/diff/replayTextDiff.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export function ReplayTextDiff() {

const {data, isLoading} = useExtractPageHtml({
replay,
offsetMsToStopAt: [leftOffsetMs, rightOffsetMs],
// Add 1 to each offset so we read the HTML just after the specified time
// and can therefore see the results of the mutations that happened at the
// requested times, instead of landing on those times directly.
offsetMsToStopAt: [leftOffsetMs + 1, rightOffsetMs + 1],
});

const [leftBody, rightBody] = useMemo(
Expand Down

0 comments on commit 6f8412f

Please sign in to comment.