Skip to content

Commit 0113054

Browse files
committed
fix(app): add null check for diff.file in session-side-panel
The web UI was crashing with 'Cannot read properties of undefined (reading replaceAll)' when diff.file was undefined. Added a null check to skip diffs without a file property before calling normalize(). Fixes anomalyco#19270
1 parent 1cb5f9f commit 0113054

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎packages/app/src/pages/session/session-side-panel.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export function SessionSidePanel(props: {
8383

8484
const out = new Map<string, "add" | "del" | "mix">()
8585
for (const diff of diffs()) {
86+
if (!diff.file) continue
8687
const file = normalize(diff.file)
8788
const kind = diff.status === "added" ? "add" : diff.status === "deleted" ? "del" : "mix"
8889

0 commit comments

Comments
 (0)