Skip to content

Commit

Permalink
No diff no addition in appendix
Browse files Browse the repository at this point in the history
  • Loading branch information
thordurhhh committed Oct 7, 2024
1 parent ea6cc03 commit 58901f9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,17 @@ export const EditChange = (props: EditChangeProp) => {
return `<div data-diff="new">${diff}</div>` as HTMLText
}

const noChange = dirtyClean(previous) === dirtyClean(current)
if (noChange) {
// If the appendix has no changes
return undefined
}

if (diff) {
// If the appendix has changes
return diff
} else {
// If the appendix has no changes
// If the appendix has no diff
return undefined
}
}
Expand Down

0 comments on commit 58901f9

Please sign in to comment.