Skip to content

Commit

Permalink
fix(regulations-admin): No diff no addition in appendix (#16293)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
thordurhhh and kodiakhq[bot] committed Oct 8, 2024
1 parent 8230275 commit 6035614
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 6035614

Please sign in to comment.