fix(ui): correct diff render condition logic (#23670)

This commit is contained in:
Brendan Allan 2026-04-21 18:49:04 +08:00 committed by GitHub
parent 92c005866b
commit febadc5589
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -388,7 +388,7 @@ export const SessionReview = (props: SessionReviewProps) => {
const file = diff.file
// binary files have empty diffs that we can't render
const diffCanRender = () => diff.additions !== 0 && diff.deletions !== 0
const diffCanRender = () => diff.additions !== 0 || diff.deletions !== 0
const expanded = createMemo(() => open().includes(file))
const mounted = createMemo(() => expanded() && (!!store.visible[file] || pinned(file)))