Skip to content

Commit c306255

Browse files
committed
Fix unreachable code error
1 parent c8d32b4 commit c306255

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/judicial-system/backend/src/app/modules/defendant/civilClaimant.service.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ export class CivilClaimantService {
6565
this.logger.error(
6666
`Unexpected number of rows (${numberOfAffectedRows}) affected when deleting civil claimant ${civilClaimantId} of case ${caseId}`,
6767
)
68-
if (numberOfAffectedRows < 1) {
69-
throw new Error(`Could not delete civil claimant ${civilClaimantId}`)
70-
}
68+
} else if (numberOfAffectedRows < 1) {
69+
throw new Error(`Could not delete civil claimant ${civilClaimantId}`)
7170
}
7271

7372
return true

0 commit comments

Comments
 (0)