Fix panic in uncommitted_diffs_for_events (#58410)

nightly only i believe so no rel notes
Release Notes:

- N/A or Added/Fixed/Improved ...
08934fa550Lukas Wirth committed on 6/3/2026, 12:14:44 PM· committed by GitHubparent95dfe8c
1 file changedLine totals unavailable