fix(sessions): allow optional patch field in diff for migrated sessions (#26574)

This commit is contained in:
OpeOginni
2026-05-09 22:23:28 +02:00
committed by GitHub
parent 8602937a37
commit d62442bb5d
3 changed files with 5 additions and 4 deletions

View File

@@ -23,11 +23,12 @@ function span(id: string, value: { value: string; start: number; end: number })
}
}
function diff(kind: string, diffs: { file: string; patch: string }[] | undefined) {
function diff(kind: string, diffs: { file: string; patch?: string }[] | undefined) {
return diffs?.map((item, i) => ({
...item,
file: redact(`${kind}-file`, String(i), item.file),
patch: redact(`${kind}-patch`, String(i), item.patch),
patch:
item.patch === undefined ? undefined : redact(`${kind}-patch`, String(i), item.patch),
}))
}