1 verses of the World English Bible have both "convicted" and "if".
James 2:9 But if you show partiality, you commit sin, being convicted by the law as transgressors.
In other translations: ASV YLT Darby Webster